forked from sebt3/hubzilla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
81 lines (75 loc) · 2.36 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
version: '3.5'
networks:
public:
external: true
hubzilla:
services:
hub_db:
container_name: hubzilla_database # ARBITARY (user can/should change)
image: postgres:16-alpine
restart: unless-stopped
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"]
interval: 10s
timeout: 5s
retries: 5
#healthcheck:
# test: ["/usr/bin/mysql --user=${DB_USER} --password=${DB_PASSWORD} --execute \"SHOW DATABASES;\""]
# interval: 10s
# timeout: 5s
# retries: 5
networks:
- hubzilla
volumes:
- "${LOC_DB}:/var/lib/postgresql/data"
hub_web:
container_name: hubzilla_webserver # ARBITARY (user can/should change)
image: nginx:1.25.3-alpine
restart: unless-stopped
depends_on:
- hub
- hub_cron
env_file:
- .env
volumes:
- "${LOC_NGINXCONF}:/etc/nginx/nginx.conf:ro"
- web_root:/var/www/html:Z # Retain the capital Z (SELinux permission issues)
networks:
- public
labels: # Traefik rules: may NOT work/ be applicable to everyone
- traefik.enable=true
- traefik.http.routers.hub_web.rule=Host(`domain.com`)
- traefik.http.routers.hub_web.tls=true
- traefik.http.routers.hub_web.tls.certresolver=le
- traefik.http.routers.hub_web.entrypoints=websecure
- traefik.http.services.hub_web.loadbalancer.server.port=80
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
- traefik.http.routers.redirect.rule=Host(`domain.com`)
- traefik.http.routers.redirect.middlewares=redirect-to-https
- traefik.http.routers.redirect.entrypoints=web
hub:
container_name: hubzilla_itself # ARBITARY (user can/should change)
image: "dhitchenor/hubzilla:${VER_FULL}"
restart: unless-stopped
depends_on:
- hub_db
env_file:
- .env
networks:
- public
- hubzilla
volumes:
- web_root:/var/www/html:Z # Retain the capital Z (SELinux permission issues)
hub_cron:
container_name: hubzilla_cronjob # ARBITARY (user can/should change)
image: "dhitchenor/hubzilla:${VER_FULL}"
restart: unless-stopped
depends_on:
- hub_db
networks:
- hubzilla
command: ["crond", "-f"]
volumes:
web_root: