Skip to content

Commit

Permalink
Restart runserver when it dies
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbowman authored and Jeremy Bowman committed Jun 15, 2017
1 parent 0cdd491 commit 972d284
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ services:

# edX services
credentials:
command: bash -c 'python /edx/app/credentials/credentials/manage.py runserver 0.0.0.0:18150'
command: bash -c 'while true; do python /edx/app/credentials/credentials/manage.py runserver 0.0.0.0:18150; sleep 2; done'
container_name: edx.devstack.credentials
depends_on:
- mysql
Expand All @@ -70,7 +70,7 @@ services:
- "18150:18150"

discovery:
command: bash -c 'source /edx/app/discovery/discovery_env && python /edx/app/discovery/discovery/manage.py runserver 0.0.0.0:18381'
command: bash -c 'source /edx/app/discovery/discovery_env && while true; do python /edx/app/discovery/discovery/manage.py runserver 0.0.0.0:18381; sleep 2; done'
container_name: edx.devstack.discovery
depends_on:
- mysql
Expand All @@ -84,7 +84,7 @@ services:
- "18381:18381"

ecommerce:
command: bash -c 'source /edx/app/ecommerce/ecommerce_env && python /edx/app/ecommerce/ecommerce/manage.py runserver 0.0.0.0:18130'
command: bash -c 'source /edx/app/ecommerce/ecommerce_env && while true; do python /edx/app/ecommerce/ecommerce/manage.py runserver 0.0.0.0:18130; sleep 2; done'
container_name: edx.devstack.ecommerce
depends_on:
- mysql
Expand All @@ -96,7 +96,7 @@ services:
- "18130:18130"

lms:
command: bash -c 'source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py lms runserver 0.0.0.0:18000 --settings devstack_docker'
command: bash -c 'source /edx/app/edxapp/edxapp_env && while true; do python /edx/app/edxapp/edx-platform/manage.py lms runserver 0.0.0.0:18000 --settings devstack_docker; sleep 2; done'
container_name: edx.devstack.lms
depends_on:
- mysql
Expand All @@ -109,7 +109,7 @@ services:
- "18000:18000"

studio:
command: bash -c 'source /edx/app/edxapp/edxapp_env && python /edx/app/edxapp/edx-platform/manage.py cms runserver 0.0.0.0:18010 --settings devstack_docker'
command: bash -c 'source /edx/app/edxapp/edxapp_env && while true; do python /edx/app/edxapp/edx-platform/manage.py cms runserver 0.0.0.0:18010 --settings devstack_docker; sleep 2; done'
container_name: edx.devstack.studio
depends_on:
- mysql
Expand Down

0 comments on commit 972d284

Please sign in to comment.