fix: Add restart Policies

- fix: Add default to env vars
This commit is contained in:
JJ-Cronos 2025-03-28 08:54:49 +02:00
parent 48c76080a5
commit 2644f09c71

View file

@ -4,6 +4,7 @@ x-customizable-image: &customizable_image
#TODO Replace Image with Custom Image for production. See https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md #TODO Replace Image with Custom Image for production. See https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md
image: rafnav/rafnav_bench:1.0 image: rafnav/rafnav_bench:1.0
pull_policy: ${PULL_POLICY:-always} pull_policy: ${PULL_POLICY:-always}
restart: ${RESTART_POLICY:-unless-stopped}
x-depends-on-configurator: &depends_on_configurator x-depends-on-configurator: &depends_on_configurator
depends_on: depends_on:
@ -34,12 +35,13 @@ services:
bench set-config -gp socketio_port $$SOCKETIO_PORT; bench set-config -gp socketio_port $$SOCKETIO_PORT;
bench build --production; bench build --production;
environment: environment:
DB_HOST: ${DB_HOST} DB_HOST: ${DB_HOST:-}
DB_PORT: ${DB_PORT} DB_PORT: ${DB_PORT:-}
REDIS_CACHE: ${REDIS_CACHE} REDIS_CACHE: ${REDIS_CACHE:-}
REDIS_QUEUE: ${REDIS_QUEUE} REDIS_QUEUE: ${REDIS_QUEUE:-}
SOCKETIO_PORT: 9000 SOCKETIO_PORT: 9000
depends_on: {} depends_on: {}
restart: on-failure
backend: backend:
<<: *backend_defaults <<: *backend_defaults