исправить: изолировать порты smoke-теста
This commit is contained in:
+10
-3
@@ -212,9 +212,10 @@ jobs:
|
||||
run: |
|
||||
mkdir -p .tmp
|
||||
cat > .tmp/community-smoke.env <<'EOF'
|
||||
COMPOSE_PROJECT_NAME=crank-ci-smoke
|
||||
COMPOSE_PROJECT_NAME=crank-ci-smoke-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
POSTGRES_HOST=postgres
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_PUBLISH_PORT=0
|
||||
POSTGRES_DB=crank
|
||||
POSTGRES_USER=crank
|
||||
POSTGRES_PASSWORD=crank-ci-password
|
||||
@@ -227,18 +228,24 @@ jobs:
|
||||
CRANK_BOOTSTRAP_ADMIN_EMAIL=owner@crank.test
|
||||
CRANK_BOOTSTRAP_ADMIN_PASSWORD=ci-admin-password
|
||||
CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME=CI Owner
|
||||
CRANK_BASE_URL=http://127.0.0.1:3000
|
||||
CRANK_BASE_URL=http://127.0.0.1
|
||||
CRANK_PUBLISH_BIND=127.0.0.1
|
||||
CRANK_ADMIN_PUBLISH_PORT=0
|
||||
CRANK_MCP_PUBLISH_PORT=0
|
||||
CRANK_UI_PUBLISH_PORT=0
|
||||
CRANK_DEMO_SEED=true
|
||||
EOF
|
||||
docker compose -f deploy/community/docker-compose.images.yml \
|
||||
--env-file .tmp/community-smoke.env --profile local-db up -d --wait
|
||||
ui_address="$(docker compose -f deploy/community/docker-compose.images.yml \
|
||||
--env-file .tmp/community-smoke.env port ui 3000)"
|
||||
printf 'http://%s\n' "$ui_address" > .tmp/community-smoke.url
|
||||
|
||||
- name: Run authenticated Community image smoke
|
||||
env:
|
||||
CRANK_STAGING_ADMIN_EMAIL: owner@crank.test
|
||||
CRANK_STAGING_ADMIN_PASSWORD: ci-admin-password
|
||||
run: scripts/authenticated-product-smoke.sh http://127.0.0.1:3000
|
||||
run: scripts/authenticated-product-smoke.sh "$(cat .tmp/community-smoke.url)"
|
||||
|
||||
- name: Show Community image logs
|
||||
if: failure()
|
||||
|
||||
@@ -11,7 +11,7 @@ services:
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "${POSTGRES_PUBLISH_BIND:-127.0.0.1}:5432:5432"
|
||||
- "${POSTGRES_PUBLISH_BIND:-127.0.0.1}:${POSTGRES_PUBLISH_PORT:-5432}:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-crank} -d ${POSTGRES_DB:-crank}"]
|
||||
interval: 10s
|
||||
@@ -27,7 +27,7 @@ services:
|
||||
volumes:
|
||||
- valkey_data:/data
|
||||
ports:
|
||||
- "${VALKEY_PUBLISH_BIND:-127.0.0.1}:6379:6379"
|
||||
- "${VALKEY_PUBLISH_BIND:-127.0.0.1}:${VALKEY_PUBLISH_PORT:-6379}:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "valkey-cli", "ping"]
|
||||
interval: 10s
|
||||
@@ -95,7 +95,7 @@ services:
|
||||
volumes:
|
||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||
ports:
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3001:3001"
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_ADMIN_PUBLISH_PORT:-3001}:3001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3001/ready"]
|
||||
interval: 15s
|
||||
@@ -156,7 +156,7 @@ services:
|
||||
volumes:
|
||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||
ports:
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3002:3002"
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_MCP_PUBLISH_PORT:-3002}:3002"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3002/ready"]
|
||||
interval: 15s
|
||||
@@ -167,7 +167,7 @@ services:
|
||||
image: ${CRANK_UI_IMAGE:-git.itexp.me/bsodfather/crank-community-ui:main}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3000:3000"
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_UI_PUBLISH_PORT:-3000}:3000"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
|
||||
interval: 15s
|
||||
|
||||
@@ -75,7 +75,7 @@ services:
|
||||
volumes:
|
||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||
ports:
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3001:3001"
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_ADMIN_PUBLISH_PORT:-3001}:3001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3001/ready"]
|
||||
interval: 15s
|
||||
@@ -135,7 +135,7 @@ services:
|
||||
volumes:
|
||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||
ports:
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3002:3002"
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_MCP_PUBLISH_PORT:-3002}:3002"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://127.0.0.1:3002/ready"]
|
||||
interval: 15s
|
||||
@@ -149,7 +149,7 @@ services:
|
||||
dockerfile: apps/ui/Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:3000:3000"
|
||||
- "${CRANK_PUBLISH_BIND:-127.0.0.1}:${CRANK_UI_PUBLISH_PORT:-3000}:3000"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
|
||||
interval: 15s
|
||||
|
||||
Reference in New Issue
Block a user