1
0
Fork 0
mirror of synced 2024-05-19 04:02:34 +12:00
appwrite/docker-stack.yml
2019-05-11 18:30:53 +03:00

144 lines
3.3 KiB
YAML

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