7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-03 14:50:47 +00:00

Update container restart policy

Make containers not restart automatically on boot when they were
manually stopped before. Make sure this is the case for all containers.
This commit is contained in:
Régis Behmo 2018-02-08 07:40:18 +01:00
parent 9546be53e9
commit 1fcae62d2f

View File

@ -5,17 +5,20 @@ services:
memcached: memcached:
image: memcached:1.4.38 image: memcached:1.4.38
restart: unless-stopped
mongodb: mongodb:
image: mongo:3.0.14
# Use WiredTiger in all environments, just like at edx.org # Use WiredTiger in all environments, just like at edx.org
command: mongod --smallfiles --nojournal --storageEngine wiredTiger command: mongod --smallfiles --nojournal --storageEngine wiredTiger
image: mongo:3.0.14 restart: unless-stopped
volumes: volumes:
- ./data/mongodb:/data/db - ./data/mongodb:/data/db
mysql: mysql:
image: mysql:5.6.36 image: mysql:5.6.36
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
restart: unless-stopped
volumes: volumes:
- ./data/mysql:/var/lib/mysql - ./data/mysql:/var/lib/mysql
- ./mysql/config/:/etc/mysql/conf.d/openedx - ./mysql/config/:/etc/mysql/conf.d/openedx
@ -29,7 +32,7 @@ services:
nginx: nginx:
build: build:
context: ./nginx context: ./nginx
restart: on-failure restart: unless-stopped
ports: ports:
- "80:80" - "80:80"
volumes: volumes:
@ -46,6 +49,7 @@ services:
# Simple SMTP server # Simple SMTP server
smtp: smtp:
image: namshi/smtp image: namshi/smtp
restart: unless-stopped
############# LMS and CMS ############# LMS and CMS
@ -54,7 +58,7 @@ services:
context: ./edxapp context: ./edxapp
args: args:
service_variant: lms service_variant: lms
restart: on-failure restart: unless-stopped
volumes: volumes:
- ./data/lms:/openedx/data - ./data/lms:/openedx/data
depends_on: depends_on:
@ -69,7 +73,7 @@ services:
context: ./edxapp context: ./edxapp
args: args:
service_variant: cms service_variant: cms
restart: on-failure restart: unless-stopped
volumes: volumes:
- ./data/cms:/openedx/data - ./data/cms:/openedx/data
depends_on: depends_on:
@ -84,9 +88,9 @@ services:
args: args:
service_variant: lms service_variant: lms
command: ./manage.py lms --settings=production celery worker --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild 100 command: ./manage.py lms --settings=production celery worker --loglevel=info --hostname=edx.lms.core.default.%%h --maxtasksperchild 100
restart: unless-stopped
environment: environment:
C_FORCE_ROOT: "1" # run celery tasks as root #nofear C_FORCE_ROOT: "1" # run celery tasks as root #nofear
restart: on-failure
volumes: volumes:
- ./data/lms_worker:/openedx/data - ./data/lms_worker:/openedx/data
depends_on: depends_on:
@ -98,9 +102,9 @@ services:
args: args:
service_variant: cms service_variant: cms
command: ./manage.py cms --settings=production celery worker --loglevel=info --hostname=edx.cms.core.default.%%h --maxtasksperchild 100 command: ./manage.py cms --settings=production celery worker --loglevel=info --hostname=edx.cms.core.default.%%h --maxtasksperchild 100
restart: unless-stopped
environment: environment:
C_FORCE_ROOT: "1" # run celery tasks as root #nofear C_FORCE_ROOT: "1" # run celery tasks as root #nofear
restart: on-failure
volumes: volumes:
- ./data/cms_worker:/openedx/data - ./data/cms_worker:/openedx/data
depends_on: depends_on: