-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (41 loc) · 959 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (41 loc) · 959 Bytes
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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: querylens
POSTGRES_PASSWORD: querylens
POSTGRES_DB: querylens
command: >
postgres
-c shared_preload_libraries=pg_stat_statements
-c pg_stat_statements.track=all
-c pg_stat_statements.max=10000
volumes:
- ./infra/initdb:/docker-entrypoint-initdb.d:ro
- pgdata:/var/lib/postgresql/data
ports:
- "5434:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U querylens -d querylens"]
interval: 3s
timeout: 3s
retries: 20
backend:
build: ./backend
env_file: .env
depends_on:
db:
condition: service_healthy
ports:
- "8765:8000"
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
volumes:
- ./backend:/app
frontend:
build: ./frontend
ports:
- "3030:80"
depends_on:
- backend
volumes:
pgdata: