FPDC : Add Pod-based life hook to manage database migration
Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
parent
cfb47826bb
commit
dc4ea520c9
1 changed files with 17 additions and 4 deletions
|
@ -7,12 +7,25 @@ metadata:
|
||||||
service: fpdc
|
service: fpdc
|
||||||
name: fpdc
|
name: fpdc
|
||||||
spec:
|
spec:
|
||||||
replicas: 2
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
app: fpdc
|
app: fpdc
|
||||||
deploymentconfig: fpdc
|
deploymentconfig: fpdc
|
||||||
strategy:
|
strategy:
|
||||||
resources: {}
|
type: Recreate
|
||||||
|
recreateParams:
|
||||||
|
mid:
|
||||||
|
failurePolicy: Abort
|
||||||
|
execNewPod:
|
||||||
|
containerName: fpdc
|
||||||
|
command: [ "django-admin", "migrate", "--no-input"]
|
||||||
|
env:
|
||||||
|
- name: PYTHONPATH
|
||||||
|
value: /opt/app-root/src
|
||||||
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
|
value: fpdc.settings.prod
|
||||||
|
volumes:
|
||||||
|
- config-volume
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue