2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2025-01-24 23:58:27 +00:00
frappe_docker/compose.yaml

75 lines
1.9 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 22:19:37 +05:30
services:
configurator:
<<: *backend_defaults
command: configure.py
2020-06-12 22:19:37 +05:30
environment:
2021-12-26 13:38:51 +05:30
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
REDIS_CACHE: ${REDIS_CACHE}
REDIS_QUEUE: ${REDIS_QUEUE}
REDIS_SOCKETIO: ${REDIS_SOCKETIO}
2021-12-13 19:39:48 +03:00
SOCKETIO_PORT: 9000
2021-12-26 13:38:51 +05:30
depends_on: {}
2020-06-12 22:19:37 +05:30
backend:
<<: *backend_defaults
volumes:
- sites:/home/frappe/frappe-bench/sites
- assets:/home/frappe/frappe-bench/sites/assets:ro
2021-12-13 19:39:48 +03:00
frontend:
image: frappe/frappe-nginx:${FRAPPE_VERSION}
2020-06-12 22:19:37 +05:30
environment:
2021-12-13 19:39:48 +03:00
BACKEND: backend:8000
SOCKETIO: websocket:9000
FRAPPE_SITE_NAME_HEADER: ${FRAPPE_SITE_NAME_HEADER:-$$host}
2020-06-12 22:19:37 +05:30
volumes:
2021-12-13 19:39:48 +03:00
- sites:/usr/share/nginx/html/sites
- assets:/usr/share/nginx/html/assets
depends_on:
- backend
- websocket
2021-12-13 19:39:48 +03:00
labels:
- traefik.enable=true
- traefik.http.services.frontend.loadbalancer.server.port=8080
2021-12-13 19:39:48 +03:00
- traefik.http.routers.frontend-http.entrypoints=web
- traefik.http.routers.frontend-http.rule=HostRegexp(`{any:.+}`)
2020-06-12 22:19:37 +05:30
2021-12-13 19:39:48 +03:00
websocket:
<<: *depends_on_configurator
2021-12-13 19:39:48 +03:00
image: frappe/frappe-socketio:${FRAPPE_VERSION}
2020-06-12 22:19:37 +05:30
volumes:
2021-12-13 19:39:48 +03:00
- sites:/home/frappe/frappe-bench/sites
2020-06-12 22:19:37 +05:30
2021-12-13 19:39:48 +03:00
queue-short:
<<: *backend_defaults
2021-12-13 19:39:48 +03:00
command: bench worker --queue short
2020-06-12 22:19:37 +05:30
2021-12-13 19:39:48 +03:00
queue-default:
<<: *backend_defaults
2021-12-13 19:39:48 +03:00
command: bench worker --queue default
2020-06-12 22:19:37 +05:30
2021-12-13 19:39:48 +03:00
queue-long:
<<: *backend_defaults
2021-12-13 19:39:48 +03:00
command: bench worker --queue long
2020-06-12 22:19:37 +05:30
2021-12-13 19:39:48 +03:00
scheduler:
<<: *backend_defaults
2021-12-13 19:39:48 +03:00
command: bench schedule
2020-06-12 22:19:37 +05:30
# ERPNext requires local assets access (Frappe does not)
2020-06-12 22:19:37 +05:30
volumes:
2021-12-13 19:39:48 +03:00
sites:
assets: