mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-01-10 00:37:53 +00:00
Take advantage of yaml lang: add defaults in compose file. Also require env vars
This commit is contained in:
parent
d15ef8d4e4
commit
e75cf62255
44
compose.yaml
44
compose.yaml
@ -1,6 +1,17 @@
|
|||||||
|
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
|
||||||
|
|
||||||
services:
|
services:
|
||||||
configurator:
|
configurator:
|
||||||
image: frappe/frappe-worker:${FRAPPE_VERSION}
|
<<: *backend_defaults
|
||||||
command: configure.py
|
command: configure.py
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: db
|
DB_HOST: db
|
||||||
@ -9,20 +20,15 @@ services:
|
|||||||
REDIS_QUEUE: redis:6379/1
|
REDIS_QUEUE: redis:6379/1
|
||||||
REDIS_SOCKETIO: redis:6379/2
|
REDIS_SOCKETIO: redis:6379/2
|
||||||
SOCKETIO_PORT: 9000
|
SOCKETIO_PORT: 9000
|
||||||
volumes:
|
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: frappe/frappe-worker:${FRAPPE_VERSION}
|
<<: *backend_defaults
|
||||||
volumes:
|
volumes:
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
- sites:/home/frappe/frappe-bench/sites
|
||||||
- assets:/home/frappe/frappe-bench/sites/assets
|
- assets:/home/frappe/frappe-bench/sites/assets
|
||||||
depends_on: &depends_on_configurator
|
|
||||||
configurator:
|
|
||||||
condition: service_completed_successfully
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: mariadb:10.6
|
image: mariadb:10.6
|
||||||
@ -36,7 +42,7 @@ services:
|
|||||||
- --skip-character-set-client-handshake
|
- --skip-character-set-client-handshake
|
||||||
- --skip-innodb-read-only-compressed
|
- --skip-innodb-read-only-compressed
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:?No db password set}
|
||||||
volumes:
|
volumes:
|
||||||
- db-data:/var/lib/mysql
|
- db-data:/var/lib/mysql
|
||||||
|
|
||||||
@ -76,38 +82,26 @@ services:
|
|||||||
userns_mode: host
|
userns_mode: host
|
||||||
|
|
||||||
websocket:
|
websocket:
|
||||||
|
<<: *depends_on_configurator
|
||||||
image: frappe/frappe-socketio:${FRAPPE_VERSION}
|
image: frappe/frappe-socketio:${FRAPPE_VERSION}
|
||||||
volumes:
|
volumes:
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
- sites:/home/frappe/frappe-bench/sites
|
||||||
depends_on: *depends_on_configurator
|
|
||||||
|
|
||||||
queue-short:
|
queue-short:
|
||||||
image: frappe/frappe-worker:${FRAPPE_VERSION}
|
<<: *backend_defaults
|
||||||
command: bench worker --queue short
|
command: bench worker --queue short
|
||||||
volumes:
|
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
|
||||||
depends_on: *depends_on_configurator
|
|
||||||
|
|
||||||
queue-default:
|
queue-default:
|
||||||
image: frappe/frappe-worker:${FRAPPE_VERSION}
|
<<: *backend_defaults
|
||||||
command: bench worker --queue default
|
command: bench worker --queue default
|
||||||
volumes:
|
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
|
||||||
depends_on: *depends_on_configurator
|
|
||||||
|
|
||||||
queue-long:
|
queue-long:
|
||||||
image: frappe/frappe-worker:${FRAPPE_VERSION}
|
<<: *backend_defaults
|
||||||
command: bench worker --queue long
|
command: bench worker --queue long
|
||||||
volumes:
|
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
|
||||||
depends_on: *depends_on_configurator
|
|
||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
image: frappe/frappe-worker:${FRAPPE_VERSION}
|
<<: *backend_defaults
|
||||||
command: bench schedule
|
command: bench schedule
|
||||||
volumes:
|
|
||||||
- sites:/home/frappe/frappe-bench/sites
|
|
||||||
depends_on: *depends_on_configurator
|
|
||||||
|
|
||||||
# ERPNext requires local assets access (Frappe does not)
|
# ERPNext requires local assets access (Frappe does not)
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
|
x-erpnext-backend-image: &erpnext_backend_image
|
||||||
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION:?No ERPNext version set}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
configurator:
|
configurator:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
<<: *erpnext_backend_image
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
<<: *erpnext_backend_image
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: frappe/erpnext-nginx:${ERPNEXT_VERSION}
|
image: frappe/erpnext-nginx:${ERPNEXT_VERSION}
|
||||||
|
|
||||||
queue-short:
|
queue-short:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
<<: *erpnext_backend_image
|
||||||
|
|
||||||
queue-default:
|
queue-default:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
<<: *erpnext_backend_image
|
||||||
|
|
||||||
queue-long:
|
queue-long:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
<<: *erpnext_backend_image
|
||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
<<: *erpnext_backend_image
|
||||||
|
@ -16,7 +16,7 @@ services:
|
|||||||
- --entrypoints.websecure.address=:443
|
- --entrypoints.websecure.address=:443
|
||||||
- --certificatesResolvers.main-resolver.acme.httpChallenge=true
|
- --certificatesResolvers.main-resolver.acme.httpChallenge=true
|
||||||
- --certificatesResolvers.main-resolver.acme.httpChallenge.entrypoint=web
|
- --certificatesResolvers.main-resolver.acme.httpChallenge.entrypoint=web
|
||||||
- --certificatesResolvers.main-resolver.acme.email=${LETSENCRYPT_EMAIL}
|
- --certificatesResolvers.main-resolver.acme.email=${LETSENCRYPT_EMAIL:?No Let's Encrypt email set}
|
||||||
- --certificatesResolvers.main-resolver.acme.storage=/letsencrypt/acme.json
|
- --certificatesResolvers.main-resolver.acme.storage=/letsencrypt/acme.json
|
||||||
ports:
|
ports:
|
||||||
- 443:443
|
- 443:443
|
||||||
|
@ -13,6 +13,6 @@ services:
|
|||||||
retries: 15
|
retries: 15
|
||||||
command: []
|
command: []
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
POSTGRES_PASSWORD: ${DB_PASSWORD:?No db password set}
|
||||||
volumes:
|
volumes:
|
||||||
- db-data:/var/lib/postgresql
|
- db-data:/var/lib/postgresql
|
||||||
|
Loading…
Reference in New Issue
Block a user