From 387e234ef7c6c5286c8dd3b5d59e4e9a9c3b9878 Mon Sep 17 00:00:00 2001 From: Montana Low Date: Wed, 1 Mar 2023 09:26:06 -0800 Subject: [PATCH] depend on postgres --- docker-compose.yml | 15 +++++++-------- pgml-dashboard/Dockerfile | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) 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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy