diff --git a/docker-compose.yml b/docker-compose.yml index 2852f8788..3d49c620b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,10 @@ version: "3" services: postgres: healthcheck: - test: psql -c 'SELECT 1' -U postgres -h 127.0.0.1 - interval: 2s - retries: 3 - timeout: 2s + test: [ "CMD-SHELL", "pg_isready" ] + interval: 1s + timeout: 5s + retries: 100 build: context: ./pgml-extension/ dockerfile: Dockerfile.local @@ -16,7 +16,8 @@ services: - infinity dashboard: depends_on: - - postgres + postgres: + condition: service_healthy build: context: ./pgml-dashboard/ dockerfile: Dockerfile @@ -25,9 +26,7 @@ services: environment: ROCKET_ADDRESS: 0.0.0.0 DATABASE_URL: postgres://postgres:postgres@postgres:5432/pgml_development - command: - - cargo - - run + command: bash -c "sqlx migrate run && cargo run" docs: build: context: ./pgml-docs/ diff --git a/pgml-dashboard/Dockerfile b/pgml-dashboard/Dockerfile index a800d772d..a6bef3507 100644 --- a/pgml-dashboard/Dockerfile +++ b/pgml-dashboard/Dockerfile @@ -1,4 +1,4 @@ FROM rust:1 COPY . /app WORKDIR /app -RUN cargo build +RUN cargo install sqlx-cli
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: