dockerized atproto relay
1services:
2 relay:
3 env_file: .env
4 network_mode: "host"
5 logging:
6 driver: "local"
7 options:
8 max-size: "100m"
9 max-file: "3"
10 build:
11 context: ./indigo
12 dockerfile: cmd/relay/Dockerfile
13 restart: on-failure
14 depends_on:
15 db:
16 condition: service_healthy
17 restart: true
18 volumes:
19 - ${HOME}/data/relay/persist:/data/relay/persist
20 caddy:
21 image: caddy:2.10-alpine
22 restart: unless-stopped
23 network_mode: host
24 ports:
25 - "80:80"
26 - "443:443"
27 volumes:
28 - $PWD/conf:/etc/caddy
29 - caddy_data:/data
30 # Uncomment grafana and prometheus before building container if you want to use these
31 # grafana:
32 # env_file: .env
33 # image: grafana/grafana-oss
34 # container_name: grafana
35 # restart: unless-stopped
36 # depends_on:
37 # - prometheus
38 # ports:
39 # - "3000:3000"
40 # networks:
41 # - backend
42 # volumes:
43 # - ./conf/grafana.ini:/etc/grafana/grafana.ini
44 # - ${HOME}/grafana-storage:/var/lib/grafana
45 # prometheus:
46 # image: prom/prometheus:latest
47 # networks:
48 # - backend
49 # ports:
50 # - "9090:9090"
51 # volumes:
52 # - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
53 # depends_on:
54 # - relay
55 db:
56 env_file: .env
57 image: postgres:16-alpine
58 healthcheck:
59 test: ["CMD-SHELL", "pg_isready -U relay"]
60 retries: 5
61 start_period: 30s
62 timeout: 10s
63 restart: always
64 volumes:
65 - ${HOME}/postgres-data:/var/lib/postgresql/data
66 - ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
67 ports:
68 - "5432:5432"
69 networks:
70 - backend
71volumes:
72 caddy_data:
73 caddy_config:
74 grafana-storage: {}
75
76networks:
77 backend: