2023-01-30 08:52:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SERVICE=$1 && shift 1
|
|
|
|
|
|
|
|
if [ "$SERVICE" == "" ]; then
|
|
|
|
echo "Please input a service name as parameter"
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Bundling and building local docker image for service: $SERVICE"
|
|
|
|
|
|
|
|
rm -rf $TMPDIR/bundle-$SERVICE/
|
|
|
|
mkdir -p $TMPDIR/bundle-$SERVICE
|
|
|
|
|
2023-01-30 11:49:14 +00:00
|
|
|
yearn clean
|
|
|
|
|
|
|
|
yarn workspace @standardnotes/$SERVICE-server build
|
|
|
|
|
2023-01-30 08:52:57 +00:00
|
|
|
yarn workspace @standardnotes/$SERVICE-server bundle --no-compress --output-directory $TMPDIR/bundle-$SERVICE
|
|
|
|
|
|
|
|
docker build $TMPDIR/bundle-$SERVICE -f $TMPDIR/bundle-$SERVICE/packages/$SERVICE/Dockerfile -t standardnotes/$SERVICE:local
|