-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
95 lines (87 loc) · 2.3 KB
/
docker-compose.yml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
services:
postgres:
image: postgres
volumes:
- ./data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
ports:
- 5432
networks:
- postgres
restart: unless-stopped
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
pgbackup:
image: codestation/go-s3-backup
networks:
- postgres
entrypoint: "/bin/go-s3-backup backup postgres s3"
environment:
SCHEDULE: "${BACKUP_SCHEDULE}"
AWS_ACCESS_KEY_ID: "${S3_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${S3_SECRET_ACCESS_KEY}"
S3_REGION: "${S3_REGION}"
S3_BUCKET: "${S3_BUCKET}"
S3_PREFIX: "${S3_PREFIX}"
DATABASE_HOST: postgres
DATABASE_PORT: 5432
DATABASE_NAME: "bender_${RAILS_ENV}"
DATABASE_USER: postgres
DATABASE_PASSWORD: password
DATABASE_COMPRESS: true
web:
build: .
volumes:
- .:/myapp
- /sys:/sys # GPIO access
depends_on:
postgres:
condition: service_healthy
restart: always
# devices:
# - /dev/gpiomem:/dev/gpiomem
networks:
- caddy
- postgres
env_file:
- .env
environment:
DATABASE_URL: postgres://postgres:password@postgres:5432/bender_${RAILS_ENV}
RAILS_ENV: ${RAILS_ENV:-development}
url: http://${HOST}
labels:
caddy: ${HOST}
caddy.encode: zstd gzip
caddy.reverse_proxy: "{{upstreams 3000}}"
caddy.tls.dns: "cloudflare ${CF_API_TOKEN}"
caddy:
image: dedene/caddy-docker-proxy-cloudflare:latest
ports:
- 80:80
- 443:443
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
- caddy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- caddy_data:/data
restart: unless-stopped
# https://docs.webhookrelay.com/installation-options/containerized/docker-compose
relay:
container_name: webhookrelay
image: webhookrelay/webhookrelayd-aarch64:latest
network_mode: host # required if you want to access other services running on localhost (otherwise localhost would be inside this container)
restart: always
environment:
- RELAY_KEY=${RELAY_KEY}
- RELAY_SECRET=${RELAY_SECRET}
- BUCKETS=${BUCKETS}
networks:
caddy:
external: true
postgres:
volumes:
caddy_data: {}