diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index 9cf61021..931da17f 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -61,10 +61,10 @@ services: postgres: condition: service_healthy healthcheck: - test: [ "CMD", "nc", "-z", "localhost", "9999" ] + test: "curl --fail http://127.0.0.1:9999/health || exit 1" interval: 5s timeout: 5s - retries: 6 + retries: 12 environment: # There are a lot of options to configure GoTrue. You can reference the example config: # 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_GOTRUE_URL=${ADMIN_FRONTEND_GOTRUE_URL:-http://gotrue:9999} - ADMIN_FRONTEND_APPFLOWY_CLOUD_URL=${ADMIN_FRONTEND_APPFLOWY_CLOUD_URL:-http://appflowy_cloud:8000} + depends_on: + appflowy_cloud: + condition: service_started ai: restart: on-failure diff --git a/services/appflowy-worker/src/main.rs b/services/appflowy-worker/src/main.rs index 157b5ab7..abfc9b4f 100644 --- a/services/appflowy-worker/src/main.rs +++ b/services/appflowy-worker/src/main.rs @@ -16,6 +16,6 @@ async fn main() -> Result<(), Box> { dotenvy::dotenv().ok(); 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 }