Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

Build after the check script wrote .env

Guido Boyke55003a77d650
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index a619660..4dc63da 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -53,8 +53,5 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Build the image
- run: docker compose build
-
- - name: Boot and check the install
- run: script/docker_check
+ - name: Build the image, boot it and check the install
+ run: script/docker_check --build
diff --git a/script/docker_check b/script/docker_check
index e878d00..fd5ed2b 100755
--- a/script/docker_check
+++ b/script/docker_check
@@ -5,7 +5,10 @@
# pull request (COMPOSE_FILE=compose.yml:compose.build.yml), docker-release.yml
# with the release image before it pushes it (LALABASE_VERSION).
#
-# HOST=lalabase-ci.test:3000 script/docker_check
+# HOST=lalabase-ci.test:3000 script/docker_check [--build]
+#
+# --build runs `docker compose build` once .env is written: compose reads the
+# required values of .env already to build.
#
# HOST is a host that is not localhost: the health check in compose.yml calls
# /up on localhost, so it passes only through the /up exemptions from the
@@ -54,6 +57,10 @@ rm -f .env.bak
echo "DATABASE_URL=postgres://lalabase:wrong@db:5432/lalabase_production"
} >> .env
+if [ "${1:-}" = "--build" ]; then
+ docker compose build
+fi
+
# --pull never: the image under test is the one built in this run. A pull
# would test whatever the registry holds under that name. The database and
# Valkey come from their registries, so they are pulled first.