Skip to content

Commit

Permalink
First multi-env test
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfillman authored and dakotablair committed Jul 25, 2023
1 parent af9c612 commit 959ad49
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/oldBP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ jobs:
- name: Get current date
id: date
run: echo "date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Run build
env:
PUBLIC_URL: '/'
REACT_APP_AUTH_SERIVCE_URL: 'https://narrative-dev.kbase.us/services/auth'
run: npm install && npm run build
# - name: Run build
# env:
# PUBLIC_URL: '/'
# REACT_APP_AUTH_SERIVCE_URL: 'https://narrative-dev.kbase.us/services/auth'
# run: npm install && npm run build
- name: Run multi-enviroment build
run: npm install && ./scripts/build_deploy.sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM nginx:stable-alpine3.17-slim
COPY build /usr/share/nginx/html
#COPY build /usr/share/nginx/html

#FROM bitnami/nginx:latest
#USER root
USER root
#
## Copy built static files for all enviroments to image
#COPY ./deploy /deploy/
COPY ./deploy /deploy/
#
## Copy nginx config template to image
#COPY ./scripts/nginx.conf.tmpl /nginx.conf.tmpl
COPY ./scripts/nginx.conf.tmpl /nginx.conf.tmpl
#
#COPY ./scripts/docker_entrypoint.sh /entrypoint.sh
#USER 1001
#ENTRYPOINT ["/entrypoint.sh"]
COPY ./scripts/docker_entrypoint.sh /entrypoint.sh
USER 1001
ENTRYPOINT ["/entrypoint.sh"]
1 change: 1 addition & 0 deletions scripts/build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

declare -a enviroments=(
# "<name> <domain> <legacy-domain>"
"ci ci.kbase.us legacy.kbase.us"
"ci-europa ci-europa.kbase.us legacy.ci-europa.kbase.us"
"narrative-dev narrative-dev.kbase.us legacy.narrative-dev.kbase.us"
)
Expand Down

0 comments on commit 959ad49

Please sign in to comment.