Skip to content

Commit 26a7619

Browse files
authored
Building the app depends on the extension being installed (#559)
1 parent 1e39fef commit 26a7619

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

docker-compose.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ version: "3"
22
services:
33
postgres:
44
healthcheck:
5-
test: psql -c 'SELECT 1' -U postgres -h 127.0.0.1
6-
interval: 2s
7-
retries: 3
8-
timeout: 2s
5+
test: [ "CMD-SHELL", "pg_isready" ]
6+
interval: 1s
7+
timeout: 5s
8+
retries: 100
99
build:
1010
context: ./pgml-extension/
1111
dockerfile: Dockerfile.local
@@ -16,7 +16,8 @@ services:
1616
- infinity
1717
dashboard:
1818
depends_on:
19-
- postgres
19+
postgres:
20+
condition: service_healthy
2021
build:
2122
context: ./pgml-dashboard/
2223
dockerfile: Dockerfile
@@ -25,9 +26,7 @@ services:
2526
environment:
2627
ROCKET_ADDRESS: 0.0.0.0
2728
DATABASE_URL: postgres://postgres:postgres@postgres:5432/pgml_development
28-
command:
29-
- cargo
30-
- run
29+
command: bash -c "sqlx migrate run && cargo run"
3130
docs:
3231
build:
3332
context: ./pgml-docs/

pgml-dashboard/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM rust:1
22
COPY . /app
33
WORKDIR /app
4-
RUN cargo build
4+
RUN cargo install sqlx-cli

0 commit comments

Comments
 (0)
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