Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(build): fail compose early and scope the Makefile export

Vlad Ligai4caca4819a50
diff --git a/Makefile b/Makefile
index c4f8fb793d..9a71d2ce72 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-# Versions pinned across multiple Dockerfiles live in one file and are exported
-# so compose can pass them as build args. Dockerfiles declare the ARG without a
-# default, so a build that misses this fails rather than installing an unpinned version.
+# Canonical versions pinned across multiple Dockerfiles. The Dockerfiles carry
+# matching ARG defaults so external builders work unaided; this exports the value
+# so compose overrides them from one place. Export only this, not every variable.
include build-versions.env
-export
+export INFISICAL_CLI_VERSION
build:
docker-compose -f docker-compose.yml build
diff --git a/docker-compose.bdd.yml b/docker-compose.bdd.yml
index b9855c2302..fd4d1c35e7 100644
--- a/docker-compose.bdd.yml
+++ b/docker-compose.bdd.yml
@@ -42,7 +42,7 @@ services:
context: ./backend
dockerfile: Dockerfile.dev
args:
- INFISICAL_CLI_VERSION: ${INFISICAL_CLI_VERSION}
+ INFISICAL_CLI_VERSION: "${INFISICAL_CLI_VERSION:?not set - run via make, or source build-versions.env first}"
depends_on:
db:
condition: service_started
diff --git a/docker-compose.dev-read-replica.yml b/docker-compose.dev-read-replica.yml
index db80682339..dc368ddbba 100644
--- a/docker-compose.dev-read-replica.yml
+++ b/docker-compose.dev-read-replica.yml
@@ -85,7 +85,7 @@ services:
context: ./backend
dockerfile: Dockerfile.dev
args:
- INFISICAL_CLI_VERSION: ${INFISICAL_CLI_VERSION}
+ INFISICAL_CLI_VERSION: "${INFISICAL_CLI_VERSION:?not set - run via make, or source build-versions.env first}"
env_file: .env
environment:
- DB_CONNECTION_URI=postgres://infisical:infisical@db/infisical?sslmode=disable
@@ -99,7 +99,7 @@ services:
context: ./backend
dockerfile: Dockerfile.dev
args:
- INFISICAL_CLI_VERSION: ${INFISICAL_CLI_VERSION}
+ INFISICAL_CLI_VERSION: "${INFISICAL_CLI_VERSION:?not set - run via make, or source build-versions.env first}"
depends_on:
db:
condition: service_started