Commit 6e4ee01f authored by Webb, Jake's avatar Webb, Jake
Browse files

Merge branch 'simulation-list' into 'main'

Simulation list

See merge request !8
parents 6ea01ba4 ac1c66ed
Loading
Loading
Loading
Loading

.env.example

0 → 100644
+2 −0
Original line number Diff line number Diff line
VITE_AUTH_URL=
VITE_BASE_PATH=
 No newline at end of file

.env.prod.example

0 → 100644
+3 −0
Original line number Diff line number Diff line
VITE_BASE_PATH=
DOCKER_REGISTRY=
K8S_NAMESPACE=
+5 −1
Original line number Diff line number Diff line
node_modules/
dist

.env
.env.prod
+2 −3
Original line number Diff line number Diff line
FROM node:20.11.1 as build
FROM node:20.11.1 AS build
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"
RUN npm run build
RUN npm run build-prod

FROM bitnami/nginx:1.25.4
EXPOSE 8080
+11 −5
Original line number Diff line number Diff line
#!/bin/bash
set -e

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 &&
# Scale down so pod gets recreated and uses new image
oc --namespace stf218-app scale deploy -l app=exadigit-simulation-dashboard --replicas=0
set -o allexport
source .env.prod
set +o allexport

docker build -t $DOCKER_REGISTRY:latest .
# Get fully qualified image name
DOCKER_IMAGE=$(docker inspect --format='{{index .RepoDigests 0}}' $DOCKER_REGISTRY:latest)
docker push $DOCKER_REGISTRY:latest

oc apply -f deployment.yaml
oc process -f ./deployment.yaml -o yaml --param=IMAGE="$DOCKER_IMAGE" --param=NAMESPACE="$K8S_NAMESPACE" | oc apply -f -
Loading