From 4fdb47bd9afb126b2bf7581e933544cafd635713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20J=C3=A4ger?= Date: Sun, 7 Jan 2024 14:44:14 +0100 Subject: [PATCH] helper script to build and push docker images --- self-hosting/build-and-push-images.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 self-hosting/build-and-push-images.sh diff --git a/self-hosting/build-and-push-images.sh b/self-hosting/build-and-push-images.sh new file mode 100755 index 000000000..3113462ef --- /dev/null +++ b/self-hosting/build-and-push-images.sh @@ -0,0 +1,18 @@ +: ${APP_ENV?Please set APP_ENV} +: ${BASE_URL?Please set BASE_URL, i.e. your public webserver URL, e.g. 'https://omnivore.example.com'} +: ${SERVER_BASE_URL?Please set SERVER_BASE_URL, i.e. your public API URL, e.g. 'https://api.omnivore.example.com'} +: ${HIGHLIGHTS_BASE_URL?Please set HIGHLIGHTS_BASE_URL, i.e. your public webserver URL, e.g. 'https://omnivore.example.com'} + +: ${DOCKER_HUB_USER?Please set DOCKER_HUB_USER} +: ${DOCKER_TAG?Please set DOCKER_TAG} + + +docker build -t ${DOCKER_HUB_USER}/omnivore-web:${DOCKER_TAG} --build-arg="APP_ENV=${APP_ENV}" --build-arg="BASE_URL=${BASE_URL}" --build-arg="SERVER_BASE_URL=${SERVER_BASE_URL}" --build-arg="HIGHLIGHTS_BASE_URL=${HIGHLIGHTS_BASE_URL}" -f ../packages/web/Dockerfile .. +docker build -t ${DOCKER_HUB_USER}/omnivore-content-fetch:${DOCKER_TAG} -f ../packages/content-fetch/Dockerfile .. +docker build -t ${DOCKER_HUB_USER}/omnivore-api:${DOCKER_TAG} -f Dockerfile .. +docker build -t ${DOCKER_HUB_USER}/omnivore-migrate:${DOCKER_TAG} -f ../packages/db/Dockerfile .. + +docker push ${DOCKER_HUB_USER}/omnivore-web:${DOCKER_TAG} +docker push ${DOCKER_HUB_USER}/omnivore-content-fetch:${DOCKER_TAG} +docker push ${DOCKER_HUB_USER}/omnivore-api:${DOCKER_TAG} +docker push ${DOCKER_HUB_USER}/omnivore-migrate:${DOCKER_TAG} \ No newline at end of file