Skip to content

Commit

Permalink
Fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sahinakkaya committed Dec 6, 2024
1 parent 367dafd commit 801f39a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/clients.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
with:
context: client
file: client/Dockerfile
build-args: |
REACT_APP_SOCKET_URL=https://blackjack-backend.sahinakkaya.dev
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
3 changes: 3 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ WORKDIR /app
# Copy package.json and yarn.lock to the working directory
COPY package.json yarn.lock ./


ARG REACT_APP_SOCKET_URL
ENV REACT_APP_SOCKET_URL=$REACT_APP_SOCKET_URL
# Install dependencies using Yarn
RUN yarn install --frozen-lockfile

Expand Down
2 changes: 2 additions & 0 deletions client/src/server/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { io } from 'socket.io-client';

const socketWithoutTypes: Socket = io( process.env.REACT_APP_SOCKET_URL ?? 'http://localhost:8000');

console.log('socket url', process.env.REACT_APP_SOCKET_URL);

interface SocketEventsOn {
[SocketOn.Connect]: () => void;
[SocketOn.TableCreated]: (
Expand Down
4 changes: 2 additions & 2 deletions infra/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ services:
env_file:
- .env.blackjack-frontend
ports:
- "8432:8000"
- "8432:3000"


blackjack-backend:
image: ghcr.io/sahinakkaya/blackjack-backend:main
env_file:
- .env.blackjack-backend
ports:
- "8433:3000"
- "8433:8000"

0 comments on commit 801f39a

Please sign in to comment.