This repository was archived by the owner on May 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (60 loc) · 1.41 KB
/
docker-compose.yml
File metadata and controls
65 lines (60 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '3.8'
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
volumes:
# Mount the source code but exclude node_modules
- ./frontend:/app
# Create an anonymous volume for node_modules to keep it container-specific
- frontend_node_modules:/app/node_modules
depends_on:
- backend
env_file: .env
networks:
- bookworm-network
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
# Mount the source code
- ./backend:/app
# Create anonymous volumes for Python cache directories to keep them container-specific
- backend_pycache:/app/__pycache__
- backend_pycache_api:/app/api/__pycache__
- backend_pycache_api_v1:/app/api/v1/__pycache__
depends_on:
- db
env_file: .env
networks:
- bookworm-network
restart: unless-stopped
db:
image: postgres:16-alpine
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
env_file: .env
networks:
- bookworm-network
restart: unless-stopped
networks:
bookworm-network:
driver: bridge
volumes:
# Database volume
postgres_data:
# Frontend volumes
frontend_node_modules:
# Backend volumes
backend_pycache:
backend_pycache_api:
backend_pycache_api_v1: