-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
85 lines (78 loc) · 2.23 KB
/
docker-compose.dev.yml
File metadata and controls
85 lines (78 loc) · 2.23 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
services:
postgres:
env_file:
- .env
image: postgres:16-alpine
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?database password required}
POSTGRES_USER: ${POSTGRES_USER:-fastid}
POSTGRES_DB: ${POSTGRES_DB:-fastid}
volumes:
- pg_data:/var/lib/postgresql/data
ports:
- "5412:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
redis:
env_file:
- .env
image: redis:7-alpine
command: redis-server --requirepass ${REDIS_PASSWORD:?redis password required}
ports:
- "6312:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
mailpit:
image: axllent/mailpit:v1.30.1
ports:
- "8025:8025"
- "1025:1025"
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8025/readyz"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
fastid-app:
build:
context: .
dockerfile: docker/Dockerfile
target: dev
env_file: .env
ports:
- "8012:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
mailpit:
condition: service_healthy
environment:
DB_URL: ${DB_URL:-postgresql+asyncpg://${POSTGRES_USER:-fastid}:${POSTGRES_PASSWORD:?database password required}@postgres:5432/${POSTGRES_DB:-fastid}}
REDIS_URL: ${REDIS_URL:-redis://:${REDIS_PASSWORD:?redis password required}@redis:6379/0}
NOTIFY_SMTP_ENABLED: ${NOTIFY_SMTP_ENABLED:-true}
NOTIFY_SMTP_HOST: ${NOTIFY_SMTP_HOST:-mailpit}
NOTIFY_SMTP_PORT: ${NOTIFY_SMTP_PORT:-1025}
volumes:
- "./migrations:/opt/fastid/migrations"
- "./fastid:/opt/fastid/fastid"
- "./templates:/opt/fastid/templates"
- "./static:/opt/fastid/static"
- "./certs:/opt/fastid/certs"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/readiness" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
pg_data: