-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (49 loc) · 1.2 KB
/
docker-compose.yml
File metadata and controls
53 lines (49 loc) · 1.2 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
version: '3.8'
services:
db:
image: postgres:15-alpine
container_name: boj_groups_db
restart: unless-stopped
environment:
POSTGRES_USER: boj_user
POSTGRES_PASSWORD: boj_password
POSTGRES_DB: boj_groups_db
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U boj_user -d boj_groups_db"]
interval: 10s
timeout: 5s
retries: 5
networks:
- boj_network
api:
build:
context: ./backend
dockerfile: Dockerfile
container_name: boj_groups_api
restart: unless-stopped
environment:
- DATABASE_URL=postgresql+asyncpg://boj_user:boj_password@db:5432/boj_groups_db
- SECRET_KEY=your-super-secret-key-change-in-production-make-it-very-long
- ALGORITHM=HS256
- ACCESS_TOKEN_EXPIRE_MINUTES=1440
ports:
- "8000:8000"
volumes:
- ./backend/app:/app/app
- ./frontend:/app/frontend
depends_on:
db:
condition: service_healthy
networks:
- boj_network
networks:
boj_network:
driver: bridge
volumes:
postgres_data:
driver: local