build for prod
All checks were successful
CI/CD Pipeline / build (push) Successful in 19s

This commit is contained in:
2026-03-04 10:34:09 -07:00
parent 9072993414
commit 07687c8ca8
3 changed files with 8 additions and 2 deletions

View File

@@ -32,7 +32,10 @@ jobs:
- name: Build and push backend image - name: Build and push backend image
run: | run: |
cd client cd client
docker build -t alexmickelson/elixir-demo-frontend:$GITHUB_RUN_NUMBER . docker build \
--build-arg VITE_WS_SERVER=wss://elixir-demo.alexmickelson.guru/socket \
-t alexmickelson/elixir-demo-frontend:$GITHUB_RUN_NUMBER \
.
docker push -q alexmickelson/elixir-demo-frontend:$GITHUB_RUN_NUMBER docker push -q alexmickelson/elixir-demo-frontend:$GITHUB_RUN_NUMBER
cd ../backend cd ../backend
docker build -t alexmickelson/elixir-demo-backend:$GITHUB_RUN_NUMBER . docker build -t alexmickelson/elixir-demo-backend:$GITHUB_RUN_NUMBER .

View File

@@ -9,6 +9,9 @@ RUN npm install -g pnpm && pnpm install --frozen-lockfile
COPY . . COPY . .
ARG VITE_WS_SERVER=ws://localhost:4000/socket
ENV VITE_WS_SERVER=$VITE_WS_SERVER
RUN pnpm build RUN pnpm build
FROM nginx:alpine FROM nginx:alpine

View File

@@ -6,7 +6,7 @@ import { WebSocketProvider } from "./contexts/WebSocketContext.tsx";
import { GameChannelProvider } from "./contexts/GameChannelContext.tsx"; import { GameChannelProvider } from "./contexts/GameChannelContext.tsx";
import { NameInput } from "./game/NameInput.tsx"; import { NameInput } from "./game/NameInput.tsx";
const WS_SERVER = "ws://localhost:4000/socket"; const WS_SERVER = import.meta.env.VITE_WS_SERVER ?? "ws://localhost:4000/socket";
const getPlayerNameFromUrl = () => { const getPlayerNameFromUrl = () => {
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);