-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (59 loc) · 1.5 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (59 loc) · 1.5 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
services:
db:
image: postgres:15
environment:
POSTGRES_USER: ${PGUSER}
POSTGRES_PASSWORD: ${PGPASSWORD}
POSTGRES_DB: ${PGNAME}
POSTGRES_PORT: ${PGPORT}
PYTHONUNBUFFERED: "1"
PYTHONDONTWRITEBYTECODE: "1"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PGUSER} -d ${PGNAME}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- ./migrations/schemas:/docker-entrypoint-initdb.d:ro
ports:
- "5432:5432"
db-seeder:
image: postgres:17-alpine
profiles:
- dev
- production
depends_on:
db:
condition: service_healthy
environment:
POSTGRES_USER: ${PGUSER}
POSTGRES_PASSWORD: ${PGPASSWORD}
POSTGRES_DB: ${PGNAME}
POSTGRES_PORT: ${PGPORT}
SEED_DIR: ${SEED_DIR}
volumes:
- ./migrations/dev-seeds:/dev-seeds:ro
- ./migrations/seeds:/seeds:ro
- ./migrations/orchestrator.sh:/orchestrator.sh:ro
entrypoint: /orchestrator.sh
api:
build: .
depends_on:
db:
condition: service_healthy
volumes:
- ./assets/images:/app/assets/images
ports:
- "8000:8000"
environment:
DATABASE_URL: "postgresql://${PGUSER}:${PGPASSWORD}@db:${PGPORT}/${PGNAME}"
PYTHONUNBUFFERED: "1"
PYTHONDONTWRITEBYTECODE: "1"
consumer-api:
build: ./consumer-api
command: uvicorn main:app --host 0.0.0.0 --port 8000
ports:
- "8001:8000"
environment:
PYTHONUNBUFFERED: "1"
PYTHONDONTWRITEBYTECODE: "1"