-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
58 lines (54 loc) · 1.4 KB
/
docker-compose.dev.yml
File metadata and controls
58 lines (54 loc) · 1.4 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
version: "3.8"
services:
db:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_USER: wokgen
POSTGRES_PASSWORD: change_me
POSTGRES_DB: wokgen
volumes:
- wokgen-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
web:
build:
context: ./apps/web
dockerfile: Dockerfile
image: wokspec/wokgen:latest
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: "postgresql://wokgen:change_me@db:5432/wokgen"
NEXT_PUBLIC_BASE_URL: "https://wokspec.org/wokgen"
NODE_ENV: production
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
interval: 30s
timeout: 5s
retries: 3
# Optional: Caddy as simple TLS reverse-proxy with automatic Let's Encrypt (example)
# Uncomment and provide a Caddyfile (see DEPLOYMENT.md) to enable HTTPS.
# caddy:
# image: caddy:2-alpine
# restart: unless-stopped
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - caddy_data:/data
# - caddy_config:/config
# - ./Caddyfile:/etc/caddy/Caddyfile:ro
# depends_on:
# - web
volumes:
wokgen-db:
# caddy_data:
# caddy_config: