build(compose): make devlake image registry configurable (#9090)

The docker-compose-dev-*.yml files pull the pre-built devlake-dashboard and
devlake-config-ui images through devlake.docker.scarf.sh, the Scarf gateway
that provides download analytics for the project.

Introduce DEVLAKE_IMAGE_REGISTRY so the registry prefix can be overridden, for
example with docker.io to pull directly from Docker Hub. The Scarf gateway
stays the default and is written inline in the compose files, so a rendered
`docker compose config` is byte-identical when the variable is unset and
existing .env files keep working untouched.

env.example documents the variable but leaves it commented out on purpose: the
services read that file via `env_file`, so an active assignment would also be
injected as an environment variable into the running containers.

Signed-off-by: DoDiODev <DoDiDev@proton.me>
diff --git a/docker-compose-dev-mysql.yml b/docker-compose-dev-mysql.yml
index 56e1f3d..a82c356 100644
--- a/docker-compose-dev-mysql.yml
+++ b/docker-compose-dev-mysql.yml
@@ -34,7 +34,7 @@
       --skip-log-bin
 
   grafana:
-    image: devlake.docker.scarf.sh/apache/devlake-dashboard:latest
+    image: ${DEVLAKE_IMAGE_REGISTRY:-devlake.docker.scarf.sh}/apache/devlake-dashboard:latest
     build:
       context: grafana/
     ports:
@@ -82,7 +82,7 @@
       - mysql
 
   config-ui:
-    image: devlake.docker.scarf.sh/apache/devlake-config-ui:latest
+    image: ${DEVLAKE_IMAGE_REGISTRY:-devlake.docker.scarf.sh}/apache/devlake-config-ui:latest
     build:
       context: "config-ui"
     ports:
diff --git a/docker-compose-dev-postgresql.yml b/docker-compose-dev-postgresql.yml
index b5dbcbb..154dc1a 100644
--- a/docker-compose-dev-postgresql.yml
+++ b/docker-compose-dev-postgresql.yml
@@ -30,7 +30,7 @@
       TZ: UTC
 
   grafana:
-    image: devlake.docker.scarf.sh/apache/devlake-dashboard:latest
+    image: ${DEVLAKE_IMAGE_REGISTRY:-devlake.docker.scarf.sh}/apache/devlake-dashboard:latest
     build:
       context: grafana/
     ports:
@@ -78,7 +78,7 @@
       - postgres
 
   config-ui:
-    image: devlake.docker.scarf.sh/apache/devlake-config-ui:latest
+    image: ${DEVLAKE_IMAGE_REGISTRY:-devlake.docker.scarf.sh}/apache/devlake-config-ui:latest
     build:
       context: "config-ui"
     ports:
diff --git a/env.example b/env.example
index b1de659..292f127 100755
--- a/env.example
+++ b/env.example
@@ -18,6 +18,15 @@
 # Lake core #
 #############
 
+# Container image registry/prefix for the pre-built devlake-dashboard and
+# devlake-config-ui images used by the docker-compose-dev-*.yml files.
+# The default is the Scarf gateway (download analytics for the Apache project)
+# and is defined in the compose files themselves, so this entry stays commented
+# out: the compose services read this file via `env_file`, and an active
+# assignment would also inject the variable into the running containers.
+# Uncomment and set it (e.g. docker.io) to pull directly from Docker Hub.
+# DEVLAKE_IMAGE_REGISTRY=devlake.docker.scarf.sh
+
 # Lake plugin dir, absolute path or relative path
 PLUGIN_DIR=bin/plugins
 REMOTE_PLUGIN_DIR=python/plugins