-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
78 lines (68 loc) · 2.19 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
# Extension ref: https://github.com/compose-spec/compose-spec/blob/main/spec.md#extension
x-environment: &env
env_file:
- ./.env
services:
sslh:
container_name: sslh
image: ghcr.io/yrutschle/sslh:latest
ports:
- 443:443
command: --foreground --listen=0.0.0.0:443 --tls=reverse-proxy:443 --ssh=host.docker.internal:22
restart: always
extra_hosts:
- host.docker.internal:host-gateway
reverse-proxy:
container_name: traefik
image: traefik:v3.3
restart: always
volumes:
# To monitor docker events
- /var/run/docker.sock:/var/run/docker.sock
# Required configs and certificates
- ./traefik.yml:/etc/traefik/traefik.yml
# Dynamic config which supports hot reloading
# See: https://doc.traefik.io/traefik/getting-started/configuration-overview/#the-dynamic-configuration
- ./certs-traefik.yml:/etc/traefik/dynamic/certs-traefik.yml
- /etc/ssl:/etc/ssl
watchtower:
container_name: watchtower
image: containrrr/watchtower
# Webhook url syntax: https://containrrr.dev/shoutrrr/v0.8/services/discord/
command: --interval 10 --notification-url="discord://${DC_WEBHOOK_TOKEN}@${DC_WEBHOOK_ID}" --no-startup-message root amd
volumes:
- /var/run/docker.sock:/var/run/docker.sock
root:
container_name: root
image: ghcr.io/amfoss/root:latest
restart: always
depends_on:
postgres:
condition: service_healthy
labels:
- traefik.enable=true
- traefik.http.routers.root.tls=true
- traefik.http.routers.root.entrypoints=websecure
- traefik.http.routers.root.rule=Host(`root.${HOSTNAME}`)
- traefik.http.services.root.loadbalancer.server.port=${ROOT_PORT}
<<: *env # YAML merge
amd:
container_name: amd
image: ghcr.io/amfoss/amd:latest
restart: always
<<: *env # YAML merge
postgres:
container_name: postgres
image: postgres:alpine
restart: always
volumes:
- db-vol:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}" ]
interval: 2s
timeout: 30s
retries: 5
start_period: 30s
<<: *env
volumes:
db-vol: