-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
57 lines (57 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
57 lines (57 loc) · 1.42 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
services:
api:
build: ./apps/api
environment:
DATABASE_URL: postgres://user:pass@db:5432/site
REDIS_URL: redis://redis:6379
JWT_SECRET: changeme
GOOGLE_SAFE_BROWSING_API_KEY: "${GOOGLE_SAFE_BROWSING_API_KEY:-}"
expose:
- "8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
web:
build: ./apps/web
environment:
NEXT_PUBLIC_VERSION: "${NEXT_PUBLIC_VERSION:-v0.11}"
expose: ["3000"]
worker:
build: ./apps/api
command: python worker.py
environment:
DATABASE_URL: postgres://user:pass@db:5432/site
REDIS_URL: redis://redis:6379
GOOGLE_SAFE_BROWSING_API_KEY: "${GOOGLE_SAFE_BROWSING_API_KEY:-}"
db:
image: postgres:16
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
POSTGRES_DB: site
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d site || exit 1"]
interval: 5s
timeout: 3s
retries: 10
redis:
image: redis:7
caddy:
image: caddy:2-alpine
depends_on: [api, web]
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
volumes:
pgdata: {}
caddy_data: {}
caddy_config: {}