Skip to content

Commit 289e797

Browse files
committed
fix(compose): honor BUZZ_MINIO_HOST_PORT / BUZZ_ADMINER_HOST_PORT for local port overrides
Extends the PGPORT / BUZZ_REDIS_HOST_PORT pattern (block#2511) to the last two hardcoded host publishes so a local MinIO/S3 or Adminer on :9000/:9001/:8082 no longer blocks `docker compose up`. - docker-compose.yml: parameterize minio (9000/9001) and adminer (8082) host ports via ${VAR:-default}; container ports unchanged. - .env.example: document the new knobs and the BUZZ_S3_ENDPOINT pairing. - dev-setup.sh: honor BUZZ_ADMINER_HOST_PORT in the readiness banner. Refs block#2479, block#2511
1 parent c70affb commit 289e797

3 files changed

Lines changed: 26 additions & 9 deletions

File tree

.env.example

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@
1010
# Postgres → localhost:5432 (override with PGPORT + DATABASE_URL together)
1111
# Redis → localhost:6379 (override with BUZZ_REDIS_HOST_PORT + REDIS_URL)
1212
# Typesense → localhost:8108
13-
# Adminer → localhost:8082 (DB browser UI)
13+
# Adminer → localhost:8082 (override with BUZZ_ADMINER_HOST_PORT)
14+
# MinIO/S3 → localhost:9000 (override with BUZZ_MINIO_HOST_PORT + BUZZ_S3_ENDPOINT)
15+
# MinIO cons. → localhost:9001 (override with BUZZ_MINIO_CONSOLE_HOST_PORT)
1416
#
15-
# If Homebrew (or another) Postgres/Redis already owns :5432/:6379, pick free
16-
# host ports and keep the connection URLs in sync, for example:
17+
# If Homebrew (or another) service already owns one of these host ports, pick a
18+
# free host port and keep the paired connection URL in sync, for example:
1719
# PGPORT=55432
1820
# DATABASE_URL=postgres://buzz:buzz_dev@localhost:55432/buzz
1921
# BUZZ_REDIS_HOST_PORT=56379
2022
# REDIS_URL=redis://localhost:56379
21-
#
22-
# Note: If port 8082 conflicts, change the adminer port in docker-compose.yml
23+
# BUZZ_MINIO_HOST_PORT=59000
24+
# BUZZ_S3_ENDPOINT=http://localhost:59000
25+
# BUZZ_MINIO_CONSOLE_HOST_PORT=59001
26+
# BUZZ_ADMINER_HOST_PORT=58082
2327
# =============================================================================
2428

2529
# -----------------------------------------------------------------------------
@@ -85,6 +89,16 @@ RELAY_URL=ws://localhost:3000
8589
# BUZZ_GIT_PACK_CACHE_MAX_BYTES=5368709120
8690
# BUZZ_GIT_PACK_CACHE_MAX_CONCURRENT_POPULATIONS=2
8791

92+
# -----------------------------------------------------------------------------
93+
# MinIO / S3 media storage
94+
# -----------------------------------------------------------------------------
95+
# Host ports published by docker-compose (container still listens on 9000/9001).
96+
# If a local MinIO/S3 owns :9000, pick a free host port and keep BUZZ_S3_ENDPOINT
97+
# in sync — the relay defaults to http://localhost:9000.
98+
# BUZZ_MINIO_HOST_PORT=9000
99+
# BUZZ_MINIO_CONSOLE_HOST_PORT=9001
100+
# BUZZ_S3_ENDPOINT=http://localhost:9000
101+
88102
# -----------------------------------------------------------------------------
89103
# Media Upload Admission
90104
# -----------------------------------------------------------------------------

docker-compose.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ services:
5858
image: adminer:latest
5959
container_name: buzz-adminer
6060
ports:
61-
- "8082:8080"
61+
# Host port follows BUZZ_ADMINER_HOST_PORT so a local :8082 can be freed (#2479).
62+
- "${BUZZ_ADMINER_HOST_PORT:-8082}:8080"
6263
networks:
6364
- buzz-net
6465
depends_on:
@@ -110,8 +111,10 @@ services:
110111
MINIO_ROOT_USER: buzz_dev
111112
MINIO_ROOT_PASSWORD: buzz_dev_secret
112113
ports:
113-
- "9000:9000"
114-
- "9001:9001"
114+
# Host ports follow BUZZ_MINIO_HOST_PORT / BUZZ_MINIO_CONSOLE_HOST_PORT so a
115+
# local MinIO/S3 can keep :9000/:9001. Keep BUZZ_S3_ENDPOINT in sync (#2479).
116+
- "${BUZZ_MINIO_HOST_PORT:-9000}:9000"
117+
- "${BUZZ_MINIO_CONSOLE_HOST_PORT:-9001}:9001"
115118
volumes:
116119
- minio-data:/data
117120
networks:

scripts/dev-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ echo -e "${GREEN}=======================================================${NC}"
189189
echo ""
190190
echo -e " ${BLUE}Postgres${NC} ${DATABASE_URL}"
191191
echo -e " ${BLUE}Redis${NC} ${REDIS_URL}"
192-
echo -e " ${BLUE}Adminer${NC} http://localhost:8082 (DB browser)"
192+
echo -e " ${BLUE}Adminer${NC} http://localhost:${BUZZ_ADMINER_HOST_PORT:-8082} (DB browser)"
193193
echo -e " ${BLUE}Keycloak${NC} http://localhost:8180 (admin / admin — local OAuth testing)"
194194
echo ""
195195
echo -e " ${YELLOW}Next steps:${NC}"

0 commit comments

Comments
 (0)