@@ -1,5 +1,3 @@ -# temporary remove python manage.py migrate for safety moving to cluster - services: app: image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA @@ -45,6 +43,25 @@ services: env_file: - $ENV + migrator: + image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA + build: + context: . + dockerfile: Dockerfile + deploy: + replicas: 1 + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + window: 30s + command: + - /bin/sh + - -c + - python manage.py migrate + env_file: + - $ENV + celery: image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA build: