fix(openapi): harden story 2.1 production lifecycle
This commit is contained in:
+16
-1
@@ -39,6 +39,19 @@ services:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
artifact-storage-init:
|
||||
image: ${CRANK_ADMIN_API_IMAGE:-crank/admin-api:dev}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: apps/admin-api/Dockerfile
|
||||
entrypoint: ["/bin/sh", "-ec"]
|
||||
command: ["install -d -m 700 -- \"$${CRANK_STORAGE_ROOT}\""]
|
||||
restart: "no"
|
||||
environment:
|
||||
CRANK_STORAGE_ROOT: ${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||
volumes:
|
||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||
|
||||
admin-api:
|
||||
image: ${CRANK_ADMIN_API_IMAGE:-crank/admin-api:dev}
|
||||
build:
|
||||
@@ -99,6 +112,8 @@ services:
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
artifact-storage-init:
|
||||
condition: service_completed_successfully
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
@@ -106,7 +121,7 @@ services:
|
||||
ports:
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3001:3001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3001/health"]
|
||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3001/ready"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
Reference in New Issue
Block a user