@@ -68,4 +68,4 @@ deploy_production: - echo "$PRODUCTION_CLUSTER_KEY" > $DOCKER_CERT_PATH/key.pem - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" $CI_REGISTRY --password-stdin script: - - docker stack deploy --with-registry-auth --compose-file stack.yml --detach backend \ No newline at end of file + - docker stack deploy --prune --with-registry-auth --resolve-image=always --compose-file stack.yml --detach backend \ No newline at end of file @@ -15,6 +15,15 @@ services: python -m uvicorn --host 0.0.0.0 --workers 8 --timeout-keep-alive 300 --ws wsproto --loop uvloop --http httptools --lifespan off --log-level info backend.asgi:application deploy: replicas: 1 + update_config: + parallelism: 1 + delay: 10s + order: start-first + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + window: 30s placement: constraints: - node.role == worker @@ -39,6 +48,15 @@ services: command: celery -A backend worker -l INFO --concurrency 8 deploy: replicas: 1 + update_config: + parallelism: 1 + delay: 10s + order: start-first + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + window: 30s placement: constraints: - node.role == worker @@ -57,6 +75,15 @@ services: command: celery -A backend beat -l INFO deploy: replicas: 1 + update_config: + parallelism: 1 + delay: 10s + order: start-first + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + window: 30s placement: constraints: - node.role == worker @@ -84,6 +111,11 @@ services: image: redis:alpine deploy: replicas: 1 + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + window: 30s placement: constraints: - node.role == worker @@ -92,6 +124,11 @@ services: image: redis:alpine deploy: replicas: 1 + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + window: 30s placement: constraints: - node.role == worker @@ -100,6 +137,11 @@ services: image: redis:alpine deploy: replicas: 1 + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 + window: 30s placement: constraints: - node.role == worker