Keep API private on shared Docker network
Verify and deploy API / verify-deploy (push) Failing after 1m47s
Verify and deploy API / verify-deploy (push) Failing after 1m47s
This commit is contained in:
@@ -20,9 +20,8 @@ jobs:
|
||||
SOURCE_SERVER: ${{ gitea.server_url }}
|
||||
SOURCE_REPOSITORY: ${{ gitea.repository }}
|
||||
SOURCE_REVISION: ${{ gitea.sha }}
|
||||
DEPLOY_PORT: ${{ vars.DEPLOY_PORT || '18082' }}
|
||||
PUBLIC_BASE_URL: ${{ vars.PUBLIC_BASE_URL || '' }}
|
||||
CORS_ORIGINS: ${{ vars.CORS_ORIGINS || 'http://47.83.180.156:3000,http://47.83.180.156:3002,http://localhost:3000,http://localhost:3002' }}
|
||||
CORS_ORIGINS: ${{ vars.CORS_ORIGINS || 'http://localhost:3000,http://localhost:3002' }}
|
||||
TEST_AUTH_ENABLED: ${{ vars.TEST_AUTH_ENABLED || 'true' }}
|
||||
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
|
||||
XHS_HUB_APP_ID: ${{ secrets.XHS_HUB_APP_ID }}
|
||||
@@ -64,7 +63,7 @@ jobs:
|
||||
test -n "$POSTGRES_PASSWORD"
|
||||
export DEPLOY_IMAGE="pk-lab-server:$SOURCE_REVISION"
|
||||
sh scripts/deploy.sh
|
||||
curl --fail --silent --show-error "http://127.0.0.1:$DEPLOY_PORT/health"
|
||||
docker compose -p pk-lab-production exec -T api python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3)"
|
||||
- name: Probe public endpoint
|
||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main' && env.PUBLIC_BASE_URL != ''
|
||||
run: curl --fail --silent --show-error --connect-timeout 10 --max-time 20 "${PUBLIC_BASE_URL%/}/health"
|
||||
|
||||
Reference in New Issue
Block a user