-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (38 loc) · 913 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (38 loc) · 913 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
services:
db:
image: postgres:16-alpine
container_name: ginga_db
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: ginga
POSTGRES_USER: ginga_user
POSTGRES_PASSWORD: ginga_password
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ginga_user -d ginga"]
interval: 5s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: Dockerfile.dev
container_name: ginga_api
command: >
sh -c "uv run alembic upgrade head &&
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000"
volumes:
- .:/app
ports:
- "8000:8000"
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://ginga_user:ginga_password@db:5432/ginga
depends_on:
db:
condition: service_healthy
volumes:
postgres_data: