Commit cfc2547a authored by Webb, Jake's avatar Webb, Jake
Browse files

updated to use env for urls

parent 787c1df6
Loading
Loading
Loading
Loading

.env.example

0 → 100644
+4 −0
Original line number Diff line number Diff line
BASE_URL=
VITE_AUTH_URL=

VITE_BASE_PATH=
 No newline at end of file
+4 −1
Original line number Diff line number Diff line
node_modules/

.env
deploy.env
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ WORKDIR /app
COPY package.json package-lock.json /app/
RUN npm ci
COPY . /app/
ENV VITE_BASE_PATH="https://obsidian.ccs.ornl.gov/exadigit/dashboard"
ENV VITE_BASE_PATH=${VITE_BASE_PATH}
RUN npm run build

FROM bitnami/nginx:1.25.4

deploy.env.example

0 → 100644
+3 −0
Original line number Diff line number Diff line
VITE_BASE_PATH=

DOCKER_REGISTRY=
 No newline at end of file
+6 −2
Original line number Diff line number Diff line
@@ -2,8 +2,12 @@
SCRIPT_DIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
cd "$SCRIPT_DIR"

docker build -t registry.apps.marble.ccs.ornl.gov/stf218-app/exadigit-simulation-dashboard:latest . &&
docker push registry.apps.marble.ccs.ornl.gov/stf218-app/exadigit-simulation-dashboard:latest &&
set -o allexport
source deploy.env
set +o allexport

docker build -t $DOCKER_REGISTRY --build-arg VITE_BASE_PATH=$VITE_BASE_PATH . &&
docker push $DOCKER_REGISTRY &&
# Scale down so pod gets recreated and uses new image
oc --namespace stf218-app scale deploy -l app=exadigit-simulation-dashboard --replicas=0

Loading