bundle.sh 568 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. SERVICE=$1 && shift 1
  3. if [ "$SERVICE" == "" ]; then
  4. echo "Please input a service name as parameter"
  5. exit 1
  6. fi
  7. echo "Bundling and building local docker image for service: $SERVICE"
  8. rm -rf $TMPDIR/bundle-$SERVICE/
  9. mkdir -p $TMPDIR/bundle-$SERVICE
  10. yearn clean
  11. yarn workspace @standardnotes/$SERVICE-server build
  12. yarn workspace @standardnotes/$SERVICE-server bundle --no-compress --output-directory $TMPDIR/bundle-$SERVICE
  13. docker build $TMPDIR/bundle-$SERVICE -f $TMPDIR/bundle-$SERVICE/packages/$SERVICE/Dockerfile -t standardnotes/$SERVICE:local