forked from todo-with/todowith
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (73 loc) Β· 1.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
81 lines (73 loc) Β· 1.47 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: '3.8'
services:
# 1. Reverse Proxy (Nginx)
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- frontend
- backend
networks:
- app-network
# 2. Frontend (Next.js)
frontend:
build:
context: ./frontend
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
environment:
- NODE_ENV=development
networks:
- app-network
# 3. Backend Core (FastAPI via uv)
backend:
build:
context: .
volumes:
- .:/app
# uv runμ μ¬μ©νμ¬ uvicorn μ€ν
command: uv run main.py
env_file:
- ./.env.secret
depends_on:
# - postgres
- redis
networks:
- app-network
# 6. Database (PostgreSQL)
# postgres:
# image: pgvector/pgvector:pg15
# ports:
# - "5432:5432"
# environment:
# - POSTGRES_USER=user
# - POSTGRES_PASSWORD=password
# - POSTGRES_DB=mydb
# volumes:
# - pg_data:/var/lib/postgresql/data
# - ./postgresql/init.sql:/docker-entrypoint-initdb.d/init.sql
# networks:
# - app-network
# 7. In-Memory DB / Message Broker (Redis)
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- app-network
volumes:
postgres_data:
pg_data:
redis_data:
networks:
app-network:
driver: bridge