-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
43 lines (41 loc) · 1 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
# ─── Development ─── For production, use: cd docker && docker compose up -d
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: openlucid
POSTGRES_PASSWORD: openlucid
POSTGRES_DB: openlucid
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openlucid"]
interval: 5s
timeout: 5s
retries: 5
app:
build: .
ports:
- "8000:8000"
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://openlucid:openlucid@postgres:5432/openlucid
depends_on:
postgres:
condition: service_healthy
volumes:
- ./uploads:/app/uploads
- ./app:/app/app
- ./alembic:/app/alembic
- ./frontend:/app/frontend
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
develop:
watch:
- action: sync
path: ./app
target: /app/app
volumes:
pgdata: