forked from appwrite/appwrite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-stack.yml
144 lines (134 loc) · 3.29 KB
/
docker-stack.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
version: '3'
services:
loadbalancer:
image: traefik:alpine
command: |-
--entryPoints="Name:http Address::80 Redirect.EntryPoint:https"
--entryPoints="Name:https Address::443 TLS"
--defaultentrypoints="http,https"
--defaultentrypoints="http"
--accesslogsfile="/var/log/access.log"
--acme
--acme.acmelogging="true"
--acme.email="example@example.com"
--acme.entrypoint="https"
--acme.storage="/acme/acme.json"
--acme.onhostrule="true"
--docker
--docker.swarmmode
--docker.domain="dev.appwrite.io"
--docker.watch
--web
ports:
- 80:80
- 443:443
networks:
- appwrite
- influxdb
- redis
volumes:
- traefik_acme:/acme/
- traefik_logs:/var/log/access.log
- /var/run/docker.sock:/var/run/docker.sock
deploy:
placement:
constraints:
- node.role == manager
labels:
traefik.enable: 'true'
traefik.frontend.rule: 'Host:lb.dev.appwrite.io'
#traefik.frontend.auth.basic: 'eldad:$$2y$$05$$PyArpB89r9PybmRMmOXBG.mJkUNE9Jyw7iONtghDGX8IsR/XSMINO' # Use this command to generate password: echo $(htpasswd -nbB user "password") | sed -e s/\\$/\\$\\$/g
traefik.port: 8080
appwrite:
build: .
restart: unless-stopped
networks:
- appwrite
- mariadb
- clamav
- redis
- influxdb
volumes:
- .:/usr/share/nginx/html
- ./docker/app/nginx.conf:/etc/nginx/nginx.conf:rw
- ./storage:/storage:rw
environment:
- _APP_ENV=development
- _APP_REDIS_HOST=redis
- _APP_REDIS_PORT=6379
- _APP_DB_HOST=mariadb
- _APP_DB_PORT=3306
- _APP_DB_SCHEMA=data-3
- _APP_OPENSSL_KEY_V1=
- _APP_DB_USER=root
- _APP_DB_PASS=
- _APP_NEWRELIC_KEY=
- _APP_MAILGUN_KEY=
- _APP_MAILGUN_DOMAIN=
- _APP_PAYPAL_CLIENT_ID=
- _APP_PAYPAL_CLIENT_KEY=
- _APP_SENTRY_DSN=
deploy:
mode: replicated
replicas: 2
labels:
traefik.enable: 'true'
traefik.frontend.rule: 'Host: dev.appwrite.io'
traefik.port: 80
traefik.docker.network: 'appwrite'
traefik.frontend.auth.forward.tls.insecureSkipVerify: 'true'
mariadb:
image: mariadb:10.4 # fix issues when upgrading using: mysql_upgrade -u root -p
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD:
networks:
- mariadb
volumes:
- ./storage/db:/var/lib/mysql:rw
redis:
image: redis:5.0
restart: unless-stopped
networks:
- redis
clamav:
image: appwrite/clamav:v1.0.2
restart: unless-stopped
networks:
- clamav
volumes:
- ./storage:/storage:rw
deploy:
mode: replicated
replicas: 2
influxdb:
image: influxdb:1.6
networks:
- influxdb
volumes:
- ./storage/influxdb:/var/lib/influxdb
kapacitor:
image: kapacitor:1.5
environment:
- KAPACITOR_HOSTNAME=kapacitor
- KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086
networks:
- influxdb
telegraf-statsd:
image: registry.gitlab.com/appwrite/appwrite/telegraf-statsd
networks:
- influxdb
volumes:
traefik_acme:
traefik_logs:
networks:
appwrite:
driver: overlay
mariadb:
driver: overlay
clamav:
driver: overlay
redis:
driver: overlay
influxdb:
driver: overlay