From 8216fe5e361b33fd7b2cefefe6c009eb0aac49ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Mon, 30 Jan 2023 09:52:57 +0100 Subject: [PATCH] chore: add script to build a local version of a service --- bundle.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bundle.sh diff --git a/bundle.sh b/bundle.sh new file mode 100755 index 000000000..8d2d06e24 --- /dev/null +++ b/bundle.sh @@ -0,0 +1,18 @@ +#!/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 + +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 \ No newline at end of file