-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (45 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
49 lines (45 loc) · 1.12 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
version: "3.9"
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: monitor
POSTGRES_PASSWORD: monitor
POSTGRES_DB: apimonitor
volumes:
- pgdata:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U monitor -d apimonitor"]
interval: 5s
timeout: 5s
retries: 10
backend:
build: ./backend
restart: unless-stopped
environment:
DATABASE_URL: postgresql+asyncpg://monitor:monitor@db:5432/apimonitor
DATABASE_SYNC_URL: postgresql+psycopg2://monitor:monitor@db:5432/apimonitor
DEBUG: "true"
FRONTEND_DIR: /frontend
volumes:
- ./backend:/app
- ./frontend:/frontend
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
nginx:
image: nginx:alpine
restart: unless-stopped
ports:
- "8090:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./frontend:/usr/share/nginx/frontend:ro
depends_on:
- backend
volumes:
pgdata: