2023-02-01 16:42:08 +00:00
|
|
|
x-customizable-image: &customizable_image
|
|
|
|
# By default the image used only contains the `frappe` and `erpnext` apps.
|
|
|
|
# See https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md
|
|
|
|
# about using custom images.
|
|
|
|
image: frappe/erpnext:${ERPNEXT_VERSION:?No ERPNext version set}
|
|
|
|
|
2022-03-14 05:53:03 +00:00
|
|
|
x-depends-on-configurator: &depends_on_configurator
|
|
|
|
depends_on:
|
|
|
|
configurator:
|
|
|
|
condition: service_completed_successfully
|
|
|
|
|
|
|
|
x-backend-defaults: &backend_defaults
|
2023-03-29 16:12:28 +00:00
|
|
|
<<: [*depends_on_configurator, *customizable_image]
|
2022-03-14 05:53:03 +00:00
|
|
|
volumes:
|
|
|
|
- sites:/home/frappe/frappe-bench/sites
|
|
|
|
|
|
|
|
services:
|
|
|
|
configurator:
|
|
|
|
<<: *backend_defaults
|
2023-01-15 22:50:09 +00:00
|
|
|
entrypoint:
|
|
|
|
- bash
|
|
|
|
- -c
|
|
|
|
command:
|
|
|
|
- >
|
2023-02-15 11:46:11 +00:00
|
|
|
ls -1 apps > sites/apps.txt;
|
2023-01-15 22:50:09 +00:00
|
|
|
bench set-config -g db_host $$DB_HOST;
|
|
|
|
bench set-config -gp db_port $$DB_PORT;
|
|
|
|
bench set-config -g redis_cache "redis://$$REDIS_CACHE";
|
|
|
|
bench set-config -g redis_queue "redis://$$REDIS_QUEUE";
|
|
|
|
bench set-config -g redis_socketio "redis://$$REDIS_SOCKETIO";
|
|
|
|
bench set-config -gp socketio_port $$SOCKETIO_PORT;
|
2022-03-14 05:53:03 +00:00
|
|
|
environment:
|
|
|
|
DB_HOST: ${DB_HOST}
|
|
|
|
DB_PORT: ${DB_PORT}
|
|
|
|
REDIS_CACHE: ${REDIS_CACHE}
|
|
|
|
REDIS_QUEUE: ${REDIS_QUEUE}
|
|
|
|
REDIS_SOCKETIO: ${REDIS_SOCKETIO}
|
|
|
|
SOCKETIO_PORT: 9000
|
|
|
|
depends_on: {}
|
|
|
|
|
|
|
|
backend:
|
|
|
|
<<: *backend_defaults
|
|
|
|
|
|
|
|
frontend:
|
2023-02-01 16:42:08 +00:00
|
|
|
<<: *customizable_image
|
2023-01-15 22:50:09 +00:00
|
|
|
command:
|
|
|
|
- nginx-entrypoint.sh
|
2022-03-14 05:53:03 +00:00
|
|
|
environment:
|
|
|
|
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}
|
2022-12-25 07:53:55 +00:00
|
|
|
PROXY_READ_TIMOUT: ${PROXY_READ_TIMOUT:-120}
|
2022-12-26 21:42:22 +00:00
|
|
|
CLIENT_MAX_BODY_SIZE: ${CLIENT_MAX_BODY_SIZE:-50m}
|
2022-03-14 05:53:03 +00:00
|
|
|
volumes:
|
2023-01-15 22:50:09 +00:00
|
|
|
- sites:/home/frappe/frappe-bench/sites
|
2022-03-14 05:53:03 +00:00
|
|
|
depends_on:
|
|
|
|
- backend
|
|
|
|
- websocket
|
|
|
|
|
|
|
|
websocket:
|
2023-03-29 16:12:28 +00:00
|
|
|
<<: [*depends_on_configurator, *customizable_image]
|
2023-01-15 22:50:09 +00:00
|
|
|
command:
|
|
|
|
- node
|
|
|
|
- /home/frappe/frappe-bench/apps/frappe/socketio.js
|
2022-03-14 05:53:03 +00:00
|
|
|
volumes:
|
|
|
|
- sites:/home/frappe/frappe-bench/sites
|
|
|
|
|
|
|
|
queue-short:
|
|
|
|
<<: *backend_defaults
|
|
|
|
command: bench worker --queue short
|
|
|
|
|
|
|
|
queue-default:
|
|
|
|
<<: *backend_defaults
|
|
|
|
command: bench worker --queue default
|
|
|
|
|
|
|
|
queue-long:
|
|
|
|
<<: *backend_defaults
|
|
|
|
command: bench worker --queue long
|
|
|
|
|
|
|
|
scheduler:
|
|
|
|
<<: *backend_defaults
|
|
|
|
command: bench schedule
|
|
|
|
|
|
|
|
# ERPNext requires local assets access (Frappe does not)
|
|
|
|
volumes:
|
|
|
|
sites:
|