2020-06-12 16:49:37 +00:00
|
|
|
version: "3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
traefik:
|
|
|
|
image: "traefik:v2.2"
|
|
|
|
command:
|
|
|
|
- "--log.level=DEBUG"
|
|
|
|
- "--providers.docker=true"
|
|
|
|
- "--providers.docker.exposedbydefault=false"
|
|
|
|
- "--entrypoints.web.address=:80"
|
|
|
|
- "--entrypoints.websecure.address=:443"
|
|
|
|
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
|
|
|
|
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
|
|
|
|
- "--certificatesresolvers.myresolver.acme.email=${LETSENCRYPT_EMAIL}"
|
|
|
|
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
|
2020-06-14 00:15:14 +00:00
|
|
|
labels:
|
|
|
|
# enable traefik
|
|
|
|
- "traefik.enable=true"
|
|
|
|
# global redirect to https for production only
|
|
|
|
- "${HTTPS_REDIRECT_RULE_LABEL}"
|
|
|
|
- "${HTTPS_REDIRECT_ENTRYPOINT_LABEL}"
|
|
|
|
- "${HTTPS_REDIRECT_MIDDLEWARE_LABEL}"
|
|
|
|
# middleware redirect for production only
|
|
|
|
- "${HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL}"
|
2020-06-12 16:49:37 +00:00
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
volumes:
|
2020-06-13 16:15:55 +00:00
|
|
|
- cert-vol:/letsencrypt
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
2021-05-05 06:26:03 +00:00
|
|
|
userns_mode: "host"
|
2020-06-12 16:49:37 +00:00
|
|
|
|
|
|
|
erpnext-nginx:
|
|
|
|
image: frappe/erpnext-nginx:${ERPNEXT_VERSION}
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
- FRAPPE_PY=erpnext-python
|
|
|
|
- FRAPPE_PY_PORT=8000
|
|
|
|
- FRAPPE_SOCKETIO=frappe-socketio
|
|
|
|
- SOCKETIO_PORT=9000
|
2021-03-30 08:21:20 +00:00
|
|
|
- SKIP_NGINX_TEMPLATE_GENERATION=${SKIP_NGINX_TEMPLATE_GENERATION}
|
2020-06-12 16:49:37 +00:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.http.routers.erpnext-nginx.rule=Host(${SITES})"
|
|
|
|
- "${ENTRYPOINT_LABEL}"
|
|
|
|
- "${CERT_RESOLVER_LABEL}"
|
2021-11-21 10:53:32 +00:00
|
|
|
- "traefik.http.services.erpnext-nginx.loadbalancer.server.port=8080"
|
2020-06-12 16:49:37 +00:00
|
|
|
volumes:
|
|
|
|
- sites-vol:/var/www/html/sites:rw
|
|
|
|
- assets-vol:/assets:rw
|
|
|
|
|
|
|
|
erpnext-python:
|
|
|
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
- MARIADB_HOST=${MARIADB_HOST}
|
|
|
|
- REDIS_CACHE=redis-cache:6379
|
|
|
|
- REDIS_QUEUE=redis-queue:6379
|
|
|
|
- REDIS_SOCKETIO=redis-socketio:6379
|
|
|
|
- SOCKETIO_PORT=9000
|
|
|
|
- AUTO_MIGRATE=1
|
2021-05-21 05:59:18 +00:00
|
|
|
- WORKER_CLASS=${WORKER_CLASS}
|
2020-06-12 16:49:37 +00:00
|
|
|
volumes:
|
|
|
|
- sites-vol:/home/frappe/frappe-bench/sites:rw
|
|
|
|
- assets-vol:/home/frappe/frappe-bench/sites/assets:rw
|
|
|
|
|
|
|
|
frappe-socketio:
|
|
|
|
image: frappe/frappe-socketio:${FRAPPE_VERSION}
|
|
|
|
restart: on-failure
|
|
|
|
depends_on:
|
|
|
|
- redis-socketio
|
|
|
|
volumes:
|
|
|
|
- sites-vol:/home/frappe/frappe-bench/sites:rw
|
2021-02-20 10:54:01 +00:00
|
|
|
- logs-vol:/home/frappe/frappe-bench/logs:rw
|
2020-06-12 16:49:37 +00:00
|
|
|
|
|
|
|
erpnext-worker-default:
|
|
|
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
|
|
|
restart: on-failure
|
|
|
|
command: worker
|
|
|
|
depends_on:
|
|
|
|
- redis-queue
|
|
|
|
- redis-cache
|
|
|
|
volumes:
|
|
|
|
- sites-vol:/home/frappe/frappe-bench/sites:rw
|
2021-02-20 10:54:01 +00:00
|
|
|
- logs-vol:/home/frappe/frappe-bench/logs:rw
|
2020-06-12 16:49:37 +00:00
|
|
|
|
|
|
|
erpnext-worker-short:
|
|
|
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
|
|
|
restart: on-failure
|
|
|
|
command: worker
|
|
|
|
environment:
|
|
|
|
- WORKER_TYPE=short
|
|
|
|
depends_on:
|
|
|
|
- redis-queue
|
|
|
|
- redis-cache
|
|
|
|
volumes:
|
|
|
|
- sites-vol:/home/frappe/frappe-bench/sites:rw
|
2021-02-20 10:54:01 +00:00
|
|
|
- logs-vol:/home/frappe/frappe-bench/logs:rw
|
2020-06-12 16:49:37 +00:00
|
|
|
|
|
|
|
erpnext-worker-long:
|
|
|
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
|
|
|
restart: on-failure
|
|
|
|
command: worker
|
|
|
|
environment:
|
|
|
|
- WORKER_TYPE=long
|
|
|
|
depends_on:
|
|
|
|
- redis-queue
|
|
|
|
- redis-cache
|
|
|
|
volumes:
|
|
|
|
- sites-vol:/home/frappe/frappe-bench/sites:rw
|
|
|
|
|
|
|
|
erpnext-schedule:
|
|
|
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
|
|
|
restart: on-failure
|
|
|
|
command: schedule
|
|
|
|
depends_on:
|
|
|
|
- redis-queue
|
|
|
|
- redis-cache
|
|
|
|
volumes:
|
|
|
|
- sites-vol:/home/frappe/frappe-bench/sites:rw
|
2021-02-20 10:54:01 +00:00
|
|
|
- logs-vol:/home/frappe/frappe-bench/logs:rw
|
2020-06-12 16:49:37 +00:00
|
|
|
|
|
|
|
redis-cache:
|
|
|
|
image: redis:latest
|
|
|
|
restart: on-failure
|
|
|
|
volumes:
|
|
|
|
- redis-cache-vol:/data
|
|
|
|
|
|
|
|
redis-queue:
|
|
|
|
image: redis:latest
|
|
|
|
restart: on-failure
|
|
|
|
volumes:
|
|
|
|
- redis-queue-vol:/data
|
|
|
|
|
|
|
|
redis-socketio:
|
|
|
|
image: redis:latest
|
|
|
|
restart: on-failure
|
|
|
|
volumes:
|
|
|
|
- redis-socketio-vol:/data
|
|
|
|
|
|
|
|
mariadb:
|
|
|
|
image: mariadb:10.3
|
|
|
|
restart: on-failure
|
|
|
|
environment:
|
|
|
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
|
|
|
volumes:
|
|
|
|
- ./installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
|
|
|
|
- mariadb-vol:/var/lib/mysql
|
|
|
|
|
|
|
|
site-creator:
|
|
|
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
2020-06-13 21:03:02 +00:00
|
|
|
restart: "no"
|
2020-06-13 16:15:55 +00:00
|
|
|
command: new
|
2020-06-12 16:49:37 +00:00
|
|
|
depends_on:
|
|
|
|
- erpnext-python
|
|
|
|
environment:
|
|
|
|
- SITE_NAME=${SITE_NAME}
|
|
|
|
- DB_ROOT_USER=${DB_ROOT_USER}
|
|
|
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
|
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
|
|
|
- INSTALL_APPS=${INSTALL_APPS}
|
|
|
|
volumes:
|
|
|
|
- sites-vol:/home/frappe/frappe-bench/sites:rw
|
2021-02-20 10:54:01 +00:00
|
|
|
- logs-vol:/home/frappe/frappe-bench/logs:rw
|
2020-06-12 16:49:37 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
mariadb-vol:
|
|
|
|
redis-cache-vol:
|
|
|
|
redis-queue-vol:
|
|
|
|
redis-socketio-vol:
|
|
|
|
assets-vol:
|
|
|
|
sites-vol:
|
|
|
|
cert-vol:
|
2021-02-20 10:54:01 +00:00
|
|
|
logs-vol:
|