Skip to content

Commit

Permalink
#267: hopefully fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolkenfarmer committed Jul 10, 2024
1 parent 5893268 commit 46b4daa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/.env.dev
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
RUN_CONFIG=dev
VITE_RUN_CONFIG=dev
VITE_SERVER_URL_HTTP=http://localhost
VITE_SERVER_URL_WS=ws://localhost:80
2 changes: 1 addition & 1 deletion frontend/.env.prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
RUN_CONFIG=prod
VITE_RUN_CONFIG=prod
VITE_SERVER_URL_HTTP=https://klinik-dps.de
VITE_SERVER_URL_WS=wss://klinik-dps.de:443
6 changes: 4 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ FROM node:latest
LABEL authors="Wolkenfarmer, Joshua Riewesell"
WORKDIR /app
# set env vars to persist them in the image
ARG VITE_RUN_CONFIG
ARG VITE_SERVER_URL_HTTP
ARG VITE_SERVER_URL_WS
ENV VITE_SERVER_URL_HTTP=${VITE_SERVER_URL_HTTP}
ENV VITE_SERVER_URL_WS=${VITE_SERVER_URL_WS}
RUN npm install -g vite
RUN if [ "$RUN_CONFIG" = "prod" ]; then npm install -g serve; fi
COPY package*.json ./
RUN npm install
COPY . .
ENV VITE_RUN_CONFIG=${VITE_RUN_CONFIG}
ENV VITE_SERVER_URL_HTTP=${VITE_SERVER_URL_HTTP}
ENV VITE_SERVER_URL_WS=${VITE_SERVER_URL_WS}
ENV PORT=5173
EXPOSE 5173
RUN if [ "$RUN_CONFIG" = "prod" ]; then npm run build-only; fi
Expand Down
3 changes: 2 additions & 1 deletion frontend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ services:
args:
- VITE_SERVER_URL_HTTP=${VITE_SERVER_URL_HTTP}
- VITE_SERVER_URL_WS=${VITE_SERVER_URL_WS}
- VITE_RUN_CONFIG=${VITE_RUN_CONFIG}
image: dps_training_k-frontend
container_name: K-dPS-frontend
env_file:
- .env.${RUN_CONFIG}
- .env.${VITE_RUN_CONFIG}
ports:
- "5173:5173"

0 comments on commit 46b4daa

Please sign in to comment.