Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
74 lines (70 loc) · 1.93 KB
/
Copy pathcompose.yml
File metadata and controls
74 lines (70 loc) · 1.93 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
services:
posta:
build:
context: .
dockerfile: docker/Dockerfile
ports:
- "9000:9000"
environment:
POSTA_DB_URL: "host=posta-db user=posta password=posta dbname=posta port=5432 sslmode=disable"
POSTA_REDIS_ADDR: "posta-redis:6379"
# Local quick start only. Production rejects the placeholder credentials
# below, so this file declares itself dev; see deploy/ for a deployable
# template that requires real secrets.
POSTA_ENV: "dev"
POSTA_JWT_SECRET: "change-me-in-production"
POSTA_ADMIN_EMAIL: "admin@example.com"
POSTA_ADMIN_PASSWORD: "admin1234"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:9000/healthz"]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
depends_on:
posta-db:
condition: service_healthy
posta-redis:
condition: service_healthy
restart: unless-stopped
worker:
build:
context: .
dockerfile: docker/Dockerfile
command: ["worker"]
environment:
POSTA_DB_URL: "host=posta-db user=posta password=posta dbname=posta port=5432 sslmode=disable"
POSTA_REDIS_ADDR: "posta-redis:6379"
POSTA_WORKER_CONCURRENCY: "10"
POSTA_WORKER_MAX_RETRIES: "5"
depends_on:
posta-db:
condition: service_healthy
posta-redis:
condition: service_healthy
restart: unless-stopped
posta-db:
image: postgres:17-alpine
environment:
POSTGRES_USER: posta
POSTGRES_PASSWORD: posta
POSTGRES_DB: posta
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U posta"]
interval: 5s
timeout: 5s
retries: 5
posta-redis:
image: redis:7-alpine
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
volumes:
db_data:
redis_data: