From 4e2cec6b38610ef150576f52bb3f27b0b93206a0 Mon Sep 17 00:00:00 2001 From: Rui Carmo Date: Sat, 11 Apr 2020 18:11:07 +0100 Subject: [PATCH] misc: add configurable service restart policy --- README.md | 1 + docker-compose.yml | 4 ++++ env.example | 4 ++++ etherpad.yml | 1 + jibri.yml | 1 + jigasi.yml | 1 + 6 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 36a15ab..faf349a 100644 --- a/README.md +++ b/README.md @@ -407,6 +407,7 @@ Variable | Description | Default value `XMPP_INTERNAL_MUC_MODULES` | Custom Prosody modules for internal MUC component (comma separated) | info,alert `GLOBAL_MODULES` | Custom prosody modules to load in global configuration (comma separated) | statistics,alert `GLOBAL_CONFIG` | Custom configuration string with escaped newlines | foo = bar;\nkey = val; +`RESTART_POLICY` | Container restart policy | defaults to `unless-stopped` `JICOFO_COMPONENT_SECRET` | XMPP component password for Jicofo | s3cr37 `JICOFO_AUTH_USER` | XMPP user for Jicofo client connections | focus `JICOFO_AUTH_PASSWORD` | XMPP password for Jicofo client connections | passw0rd diff --git a/docker-compose.yml b/docker-compose.yml index 9776fe5..112b86c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,7 @@ services: # Frontend web: image: jitsi/web + restart: ${RESTART_POLICY} ports: - '${HTTP_PORT}:80' - '${HTTPS_PORT}:443' @@ -45,6 +46,7 @@ services: # XMPP server prosody: image: jitsi/prosody + restart: ${RESTART_POLICY} expose: - '5222' - '5347' @@ -108,6 +110,7 @@ services: # Focus component jicofo: image: jitsi/jicofo + restart: ${RESTART_POLICY} volumes: - ${CONFIG}/jicofo:/config environment: @@ -134,6 +137,7 @@ services: # Video bridge jvb: image: jitsi/jvb + restart: ${RESTART_POLICY} ports: - '${JVB_PORT}:${JVB_PORT}/udp' - '${JVB_TCP_PORT}:${JVB_TCP_PORT}' diff --git a/env.example b/env.example index 939fc89..20a3590 100644 --- a/env.example +++ b/env.example @@ -317,3 +317,7 @@ JIBRI_LOGS_DIR=/config/logs # Redirect HTTP traffic to HTTPS # Necessary for Let's Encrypt, relies on standard HTTPS port (443) #ENABLE_HTTP_REDIRECT=1 + +# Container restart policy +# Defaults to unless-stopped +RESTART_POLICY=unless-stopped diff --git a/etherpad.yml b/etherpad.yml index e033a99..2d24fc3 100644 --- a/etherpad.yml +++ b/etherpad.yml @@ -4,6 +4,7 @@ services: # Etherpad: real-time collaborative document editing etherpad: image: jitsi/etherpad + restart: ${RESTART_POLICY} networks: meet.jitsi: aliases: diff --git a/jibri.yml b/jibri.yml index 324f613..806532f 100644 --- a/jibri.yml +++ b/jibri.yml @@ -3,6 +3,7 @@ version: '3' services: jibri: image: jitsi/jibri + restart: ${RESTART_POLICY} volumes: - ${CONFIG}/jibri:/config - /dev/shm:/dev/shm diff --git a/jigasi.yml b/jigasi.yml index 600ef84..c36fc17 100644 --- a/jigasi.yml +++ b/jigasi.yml @@ -4,6 +4,7 @@ services: # SIP gateway (audio) jigasi: image: jitsi/jigasi + restart: ${RESTART_POLICY} ports: - '${JIGASI_PORT_MIN}-${JIGASI_PORT_MAX}:${JIGASI_PORT_MIN}-${JIGASI_PORT_MAX}/udp' volumes: