From 9cfa70084ba963c6878c98dc399cb50b094e12ca Mon Sep 17 00:00:00 2001 From: Christopher Bisset Date: Thu, 11 Aug 2022 11:25:16 +1000 Subject: [PATCH] added ability to check out alternate branch --- docker/production/dockerfile | 4 +++- docker/production/scripts/1-image-build.sh | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/production/dockerfile b/docker/production/dockerfile index 1147635..28d25af 100644 --- a/docker/production/dockerfile +++ b/docker/production/dockerfile @@ -1,5 +1,7 @@ # arguments ARG VERSION="master" +# Branch to check out +ARG CHECKOUT_BRANCH="master" FROM node:current-alpine AS build @@ -35,8 +37,8 @@ ENV PROJECT_NAME="headscale-ui" # URL for the github/git location ENV PROJECT_URL="https://github.com/gurucomputing/headscale-ui" # Ports that caddy will run on -ENV HTTPS_PORT="443" ENV HTTP_PORT="80" +ENV HTTPS_PORT="443" # Production Web Server port. Runs a self signed SSL certificate EXPOSE 443 diff --git a/docker/production/scripts/1-image-build.sh b/docker/production/scripts/1-image-build.sh index a46d153..38fcf39 100644 --- a/docker/production/scripts/1-image-build.sh +++ b/docker/production/scripts/1-image-build.sh @@ -8,9 +8,10 @@ apk add --no-cache jq git #clone the project git clone ${PROJECT_URL} ${PROJECT_NAME} +cd ${PROJECT_NAME} +git checkout ${CHECKOUT_BRANCH} # install the project -cd ${PROJECT_NAME} npm install # inject the version number