-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.devnet.yml
More file actions
76 lines (70 loc) · 2.13 KB
/
Copy pathdocker-compose.devnet.yml
File metadata and controls
76 lines (70 loc) · 2.13 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
services:
# Provide postgres for PLC
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: ${DEVNET_DB_USER:-postgres}
POSTGRES_PASSWORD: ${DEVNET_DB_PASSWORD:-postgres}
POSTGRES_DB: ${DEVNET_DB_NAME:-plc}
ports:
- "${DEVNET_POSTGRES_PORT:-5433}:5432"
networks:
- atproto-devnet
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DEVNET_DB_USER:-postgres}"]
interval: 3s
timeout: 3s
retries: 10
# Provide maildev for PDS email verification
maildev:
image: maildev/maildev:latest
ports:
- "${DEVNET_MAILDEV_WEB_PORT:-1081}:1080"
- "${DEVNET_MAILDEV_SMTP_PORT:-1026}:1025"
networks:
- atproto-devnet
# Wire PLC to our postgres
plc:
depends_on:
postgres:
condition: service_healthy
# Wire PDS to our maildev; trust the mkcert CA so it can fetch client metadata from https://devnet.test
pds:
environment:
PDS_EMAIL_SMTP_URL: smtp://maildev:1025
NODE_EXTRA_CA_CERTS: /mkcert-ca/rootCA.pem
volumes:
- ${MKCERT_CAROOT:-~/.local/share/mkcert}:/mkcert-ca:ro
# Point init at the correct script/data paths (resolved from --project-directory .)
init:
volumes:
- ../../src/atproto-devnet/scripts:/scripts:ro
- ../../src/atproto-devnet/data:/devnet-data
# HTTPS proxy for devnet.test → pds:3000
# Required for browser ATProto OAuth (PDS service endpoint must be HTTPS)
caddy:
image: caddy:2-alpine
ports:
- "443:443"
- "80:80"
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy/client-metadata.json:/srv/client-metadata.json:ro
- ./caddy/certs/devnet.internal.pem:/certs/devnet.internal.pem:ro
- ./caddy/certs/devnet.internal-key.pem:/certs/devnet.internal-key.pem:ro
- caddy-data:/data
networks:
atproto-devnet:
aliases:
- devnet.internal
depends_on:
pds:
condition: service_healthy
healthcheck:
test: ["CMD", "caddy", "validate", "--config", "/etc/caddy/Caddyfile"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
volumes:
caddy-data: