This commit is contained in:
@@ -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 .
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user