-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-swarm.yml
83 lines (76 loc) · 1.98 KB
/
docker-swarm.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
version: "3.8"
# https://docs.docker.com/compose/compose-file/compose-file-v3/
services:
caddy:
image: caddy:latest
# https://hub.docker.com/_/caddy
volumes:
- bookstack_public:/var/www/bookstack/public
- caddy_data:/data
networks:
- bookstack
ports:
- "80:80"
- "443:443"
configs:
- source: bookstack_caddyfile
target: /etc/caddy/Caddyfile
environment:
# https://caddyserver.com/docs/automatic-https#overview
- DOMAIN=bookstack.yourdomain.test
mariadb:
image: mariadb:latest
# https://hub.docker.com/_/mariadb
volumes:
- bookstack_db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/bookstacksql_password
- MYSQL_DATABASE=bookstack
- MYSQL_USER=bookstack
- MYSQL_PASSWORD_FILE=/run/secrets/bookstacksql_password
secrets:
- bookstacksql_password
networks:
- bookstack_db
bookstack:
image: zeigren/bookstack:latest # ghcr.io/zeigren/bookstack_docker:latest
# https://hub.docker.com/r/zeigren/bookstack
environment:
- DB_PASSWORD=DOCKER-SECRET->bookstacksql_password
- APP_URL=https://bookstack.yourdomain.test
# Can be 'local', 'local_secure' or 's3'
- STORAGE_TYPE=local
# Run first without APP_KEY to have the container create one
# - APP_KEY=DOCKER-SECRET->bookstack_app_key
volumes:
- bookstack_storage:/var/www/bookstack/storage
- bookstack_public:/var/www/bookstack/public
networks:
- bookstack
- bookstack_db
- redis
secrets:
- bookstacksql_password
- bookstack_app_key
redis:
image: redis:alpine
# https://hub.docker.com/_/redis
networks:
- redis
volumes:
bookstack_db:
bookstack_storage:
bookstack_public:
caddy_data:
secrets:
bookstacksql_password:
external: true
bookstack_app_key:
external: true
networks:
bookstack:
bookstack_db:
redis:
configs:
bookstack_caddyfile:
external: true