-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
19 lines (17 loc) · 1.02 KB
/
docker-compose.yml
File metadata and controls
19 lines (17 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
services:
backend:
build: ./backend # Build the backend image from the Dockerfile in ./backend.
container_name: app-backend # Give a name to the container.
ports:
- "4000:4000" # Map the port 4000 on the host to port 4000 in the container.
volumes:
- ./backend/db:/db # Mounts the SQLite database file so data is saved even if the container restarts.
restart: unless-stopped # Always restart the container unless it is explicitly stopped.
frontend:
build: ./frontend # Build the frontend image from the Dockerfile in ./frontend.
container_name: app-frontend # Give a name to the container.
ports:
- "5173:80" # Map the port 5173 on the host to port 80 in the container.
depends_on:
- backend # Ensure the backend starts before the frontend.
restart: unless-stopped # Always restart the container unless it is explicitly stopped.