-
-
Notifications
You must be signed in to change notification settings - Fork 143
/
dokos.yml
110 lines (99 loc) · 3 KB
/
dokos.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# DOMAIN=example.com docker stack deploy -c dokos.yml dokos
# chown -R 1000:1000 sites/
# bench new-site --db-host mariadb dokos.localhost
# Create common_site_config.json with default redis config
services:
init:
image: registry.gitlab.com/dokos/dokos:${VERSION:-v4.28.1}
entrypoint: /bin/sh -c
command:
- >
ls -1 apps > sites/apps.txt;
bench set-config -g db_host mariadb;
bench set-config -gp db_port 3306;
bench set-config -g redis_cache "redis://redis-cache";
bench set-config -g redis_queue "redis://redis-queue";
bench set-config -g redis_socketio "redis://redis-socketio";
bench set-config -gp socketio_port 9000;
volumes:
- ${VOLUME_PATH}sites:/home/frappe/frappe-bench/sites
deploy:
restart_policy:
condition: on-failure
networks:
- internal
web:
image: registry.gitlab.com/dokos/dokos:${VERSION:-v4.28.1}
command: nginx-entrypoint.sh
environment:
- BACKEND=backend:8000
- SOCKETIO=websocket:9000
- FRAPPE_SITE_NAME_HEADER=${DOMAIN:-dokos.localhost}
volumes:
- ${VOLUME_PATH}sites:/home/frappe/frappe-bench/sites
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.dokos-${NUMBER:-1}.rule=Host(`${DOMAIN:-dokos.localhost}`)
- traefik.http.routers.dokos-${NUMBER:-1}.entrypoints=${SCHEME:-https}
- traefik.http.routers.dokos-${NUMBER:-1}.service=dokos-${NUMBER:-1}
- traefik.http.routers.dokos-${NUMBER:-1}.tls.certresolver=letsencrypt
- traefik.http.services.dokos-${NUMBER:-1}.loadbalancer.server.port=8080
networks:
- internal
- traefik
backend:
image: registry.gitlab.com/dokos/dokos:${VERSION:-v4.28.1}
volumes:
- ${VOLUME_PATH}sites:/home/frappe/frappe-bench/sites
networks:
- internal
websocket:
image: registry.gitlab.com/dokos/dokos:${VERSION:-v4.28.1}
command: node /home/frappe/frappe-bench/apps/frappe/socketio.js
volumes:
- ${VOLUME_PATH}sites:/home/frappe/frappe-bench/sites
networks:
- internal
scheduler:
image: registry.gitlab.com/dokos/dokos:${VERSION:-v4.28.1}
command: bench schedule
volumes:
- ${VOLUME_PATH}sites:/home/frappe/frappe-bench/sites
networks:
- internal
redis-queue:
image: redis:6.2-alpine
networks:
- internal
redis-cache:
image: redis:6.2-alpine
networks:
- internal
redis-socketio:
image: redis:6.2-alpine
networks:
- internal
mariadb:
image: mariadb:10.6
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
- --skip-innodb-read-only-compressed
environment:
- MARIADB_ROOT_PASSWORD=myp@ssw0rd
volumes:
- ${VOLUME_PATH}mariadb:/var/lib/mysql
networks:
- internal
volumes:
sites:
mariadb:
networks:
internal:
driver: overlay
attachable: true
traefik:
external: true
name: traefik-net