chore: use curl for gotrue health check when using docker-compose-ci.yml (#1189)

This commit is contained in:
Nathan.fooo 2025-01-22 21:40:47 +08:00 committed by GitHub
parent 2c7f0131c4
commit b7e08687b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -61,10 +61,10 @@ services:
postgres: postgres:
condition: service_healthy condition: service_healthy
healthcheck: healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "9999" ] test: "curl --fail http://127.0.0.1:9999/health || exit 1"
interval: 5s interval: 5s
timeout: 5s timeout: 5s
retries: 6 retries: 12
environment: environment:
# There are a lot of options to configure GoTrue. You can reference the example config: # There are a lot of options to configure GoTrue. You can reference the example config:
# https://github.com/supabase/gotrue/blob/master/example.env # https://github.com/supabase/gotrue/blob/master/example.env
@ -165,6 +165,9 @@ services:
- ADMIN_FRONTEND_REDIS_URL=${ADMIN_FRONTEND_REDIS_URL:-redis://redis:6379} - ADMIN_FRONTEND_REDIS_URL=${ADMIN_FRONTEND_REDIS_URL:-redis://redis:6379}
- ADMIN_FRONTEND_GOTRUE_URL=${ADMIN_FRONTEND_GOTRUE_URL:-http://gotrue:9999} - ADMIN_FRONTEND_GOTRUE_URL=${ADMIN_FRONTEND_GOTRUE_URL:-http://gotrue:9999}
- ADMIN_FRONTEND_APPFLOWY_CLOUD_URL=${ADMIN_FRONTEND_APPFLOWY_CLOUD_URL:-http://appflowy_cloud:8000} - ADMIN_FRONTEND_APPFLOWY_CLOUD_URL=${ADMIN_FRONTEND_APPFLOWY_CLOUD_URL:-http://appflowy_cloud:8000}
depends_on:
appflowy_cloud:
condition: service_started
ai: ai:
restart: on-failure restart: on-failure

View File

@ -16,6 +16,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
dotenvy::dotenv().ok(); dotenvy::dotenv().ok();
let listener = TcpListener::bind("0.0.0.0:4001").await.unwrap(); let listener = TcpListener::bind("0.0.0.0:4001").await.unwrap();
let config = Config::from_env().expect("failed to load config"); let config = Config::from_env()?;
run_server(listener, config).await run_server(listener, config).await
} }