Move the db initialization to a side container so we don't have to rebuild to nuke the db.

This commit is contained in:
Ralph Bean
2016-10-27 15:58:35 -04:00
committed by Matt Prahl
parent 6a12323242
commit bf33dfbb95
2 changed files with 15 additions and 2 deletions

View File

@@ -28,5 +28,3 @@ COPY koji.conf /etc/module_build_service/
COPY copr.conf /etc/module_build_service/
COPY . /opt/module_build_service/
RUN python2 ./manage.py upgradedb && python2 manage.py generatelocalhostcert

View File

@@ -30,7 +30,22 @@ services:
links:
- scheduler
- fedmsg-relay
depends_on:
- upgradedb
- generatelocalhostcert
volumes:
# module_build_service sources are bind-mounted, so you don't have to rebuild
- ./:/opt/module_build_service/:z
command: python2 manage.py runssl
upgradedb:
build: .
volumes:
- ./:/opt/module_build_service/:z
command: python2 manage.py upgradedb
generatelocalhostcert:
build: .
volumes:
- ./:/opt/module_build_service/:z
command: python2 manage.py generatelocalhostcert