Skip to content

Commit

Permalink
Fix docker compose setup
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Dec 28, 2023
1 parent 2e70fac commit dd0d737
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: "3"

services:
redis:
Expand All @@ -10,10 +10,9 @@ services:
- ./redis-volume:/data
backend:
build:
context: .
dockerfile: backend/Dockerfile
context: backend
ports:
- "8100:8100" # Backend is accessible on localhost:8100
- "8100:8100" # Backend is accessible on localhost:8100
depends_on:
- redis
env_file:
Expand All @@ -24,9 +23,8 @@ services:

frontend:
build:
context: .
dockerfile: frontend/Dockerfile
context: frontend
ports:
- "5173:5173" # Frontend is accessible on localhost:5173
- "5173:5173" # Frontend is accessible on localhost:5173
environment:
VITE_BACKEND_URL: "http://backend:8100"
6 changes: 3 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ FROM node:16
WORKDIR /frontend

# Copy the package.json and yarn.lock
COPY ./frontend/package.json ./
COPY ./frontend/yarn.lock ./
COPY ./package.json ./
COPY ./yarn.lock ./

# Install Yarn and dependencies
RUN yarn install

# Copy the rest of the frontend code
COPY ./frontend .
COPY . .

# Expose the port the frontend runs on
EXPOSE 5173
Expand Down

0 comments on commit dd0d737

Please sign in to comment.