-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (92 loc) · 2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
98 lines (92 loc) · 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
x-logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "5"
services:
backend:
build: ./backend
container_name: aqllify-backend
restart: unless-stopped
env_file: .env
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
deploy:
resources:
limits:
memory: 256M
volumes:
- ./courses:/courses:ro
networks:
- internal
- proxy
depends_on:
db:
condition: service_healthy
logging: *default-logging
bot:
build: ./backend
container_name: aqllify-bot
restart: unless-stopped
env_file: .env
command: ["python", "-m", "src.bot"]
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
memory: 128M
networks:
- internal
depends_on:
db:
condition: service_healthy
logging: *default-logging
frontend:
build: ./frontend
container_name: aqllify-frontend
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
memory: 32M
networks:
- proxy
logging: *default-logging
db:
image: postgres:17-alpine
container_name: aqllify-db
restart: unless-stopped
environment:
POSTGRES_USER: tutor
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-tutor_password}
POSTGRES_DB: tutor_db
volumes:
- aqllify-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tutor -d tutor_db"]
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 256M
networks:
- internal
logging: *default-logging
volumes:
aqllify-db-data:
networks:
internal:
driver: bridge
proxy:
external: true