2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 23:00:56 +00:00
frappe_docker/compose.yaml

78 lines
2.1 KiB
YAML
Raw Normal View History

x-depends-on-configurator: &depends_on_configurator
depends_on:
configurator:
condition: service_completed_successfully
x-backend-defaults: &backend_defaults
<<: *depends_on_configurator
image: frappe/frappe-worker:${FRAPPE_VERSION:?No Frappe version set}
volumes:
- sites:/home/frappe/frappe-bench/sites
2020-06-12 16:49:37 +00:00
services:
configurator:
<<: *backend_defaults
command: configure.py
2020-06-12 16:49:37 +00:00
environment:
2021-12-26 08:08:51 +00:00
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
REDIS_CACHE: ${REDIS_CACHE}
REDIS_QUEUE: ${REDIS_QUEUE}
REDIS_SOCKETIO: ${REDIS_SOCKETIO}
2021-12-13 16:39:48 +00:00
SOCKETIO_PORT: 9000
2021-12-26 08:08:51 +00:00
depends_on: {}
2020-06-12 16:49:37 +00:00
backend:
<<: *backend_defaults
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets:ro
2021-12-13 16:39:48 +00:00
frontend:
image: frappe/frappe-nginx:${FRAPPE_VERSION}
2020-06-12 16:49:37 +00:00
environment:
2021-12-13 16:39:48 +00:00
BACKEND: backend:8000
SOCKETIO: websocket:9000
FRAPPE_SITE_NAME_HEADER: ${FRAPPE_SITE_NAME_HEADER:-$$host}
UPSTREAM_REAL_IP_ADDRESS: ${UPSTREAM_REAL_IP_ADDRESS:-127.0.0.1}
UPSTREAM_REAL_IP_HEADER: ${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For}
UPSTREAM_REAL_IP_RECURSIVE: ${UPSTREAM_REAL_IP_RECURSIVE:-off}
2020-06-12 16:49:37 +00:00
volumes:
2021-12-13 16:39:48 +00:00
- sites:/usr/share/nginx/html/sites
- assets:/usr/share/nginx/html/assets
depends_on:
- backend
- websocket
2021-12-13 16:39:48 +00:00
labels:
- traefik.enable=true
- traefik.http.services.frontend.loadbalancer.server.port=8080
2021-12-13 16:39:48 +00:00
- traefik.http.routers.frontend-http.entrypoints=web
- traefik.http.routers.frontend-http.rule=HostRegexp(`{any:.+}`)
2020-06-12 16:49:37 +00:00
2021-12-13 16:39:48 +00:00
websocket:
<<: *depends_on_configurator
2021-12-13 16:39:48 +00:00
image: frappe/frappe-socketio:${FRAPPE_VERSION}
2020-06-12 16:49:37 +00:00
volumes:
2021-12-13 16:39:48 +00:00
- sites:/home/frappe/frappe-bench/sites
2020-06-12 16:49:37 +00:00
2021-12-13 16:39:48 +00:00
queue-short:
<<: *backend_defaults
2021-12-13 16:39:48 +00:00
command: bench worker --queue short
2020-06-12 16:49:37 +00:00
2021-12-13 16:39:48 +00:00
queue-default:
<<: *backend_defaults
2021-12-13 16:39:48 +00:00
command: bench worker --queue default
2020-06-12 16:49:37 +00:00
2021-12-13 16:39:48 +00:00
queue-long:
<<: *backend_defaults
2021-12-13 16:39:48 +00:00
command: bench worker --queue long
2020-06-12 16:49:37 +00:00
2021-12-13 16:39:48 +00:00
scheduler:
<<: *backend_defaults
2021-12-13 16:39:48 +00:00
command: bench schedule
2020-06-12 16:49:37 +00:00
# ERPNext requires local assets access (Frappe does not)
2020-06-12 16:49:37 +00:00
volumes:
2021-12-13 16:39:48 +00:00
sites:
assets: