Make Coolify service ports configurable

This commit is contained in:
2026-08-17 01:14:39 -04:00
parent 24a1307a96
commit dafa62b9bb
4 changed files with 75 additions and 57 deletions
+14 -14
View File
@@ -5,15 +5,15 @@
# ── Pair with a beenvoice Application (pick ONE) ───────────────────────────────
#
# A) Public Garage URL (most reliable — no shared Docker network required)
# 1. Redeploy this stack (includes SERVICE_FQDN_GARAGE_3900 below).
# 2. Garage resource → assign a domain for port 3900 (e.g. s3.example.com).
# 3. Copy SERVICE_URL_GARAGE_3900 from this resource's Environment tab.
# 1. Redeploy this stack (includes SERVICE_FQDN_GARAGE below).
# 2. Garage resource → assign a domain to GARAGE_API_PORT (default 3900).
# 3. Copy SERVICE_URL_GARAGE from this resource's Environment tab.
# 4. beenvoice Application → S3_ENDPOINT=<that URL> → redeploy beenvoice.
#
# B) Internal Docker DNS (same Coolify destination network)
# 1. Garage resource → Advanced → enable "Connect to Predefined Network" → redeploy.
# 2. beenvoice Application → same destination → enable "Connect to Predefined Network".
# 3. beenvoice → S3_ENDPOINT=http://garage-<GARAGE_RESOURCE_UUID>:3900
# 3. beenvoice → S3_ENDPOINT=http://garage-<GARAGE_RESOURCE_UUID>:<GARAGE_API_PORT>
#
# Recommended long-term: deploy docker-compose.coolify.yml as one stack (app+db+garage).
# See docs/COOLIFY.md.
@@ -24,7 +24,7 @@ services:
GARAGE_DEFAULT_ACCESS_KEY: ${S3_ACCESS_KEY}
GARAGE_DEFAULT_SECRET_KEY: ${S3_SECRET_KEY}
GARAGE_DEFAULT_BUCKET: ${S3_BUCKET:-beenvoice-receipts}
SERVICE_FQDN_GARAGE_3900:
SERVICE_FQDN_GARAGE:
configs:
- source: garage_config
target: /etc/garage.toml
@@ -33,7 +33,7 @@ services:
- beenvoice_garage_data:/var/lib/garage/data
command: ["/garage", "server", "--single-node", "--default-bucket"]
expose:
- "3900"
- "${GARAGE_API_PORT:-3900}"
healthcheck:
test: ["CMD", "/garage", "status"]
interval: 5s
@@ -54,21 +54,21 @@ configs:
db_engine = "sqlite"
replication_factor = 1
rpc_bind_addr = "[::]:3901"
rpc_public_addr = "garage:3901"
rpc_secret = "rpc_secret_change_me_in_production"
rpc_bind_addr = "[::]:${GARAGE_RPC_PORT:-3901}"
rpc_public_addr = "garage:${GARAGE_RPC_PORT:-3901}"
rpc_secret = "${GARAGE_RPC_SECRET:-000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f}"
[s3_api]
s3_region = "garage"
api_bind_addr = "[::]:3900"
api_bind_addr = "[::]:${GARAGE_API_PORT:-3900}"
root_domain = ".s3.garage"
[s3_web]
bind_addr = "[::]:3902"
bind_addr = "[::]:${GARAGE_WEB_PORT:-3902}"
root_domain = ".web.garage"
index = "index.html"
[admin]
api_bind_addr = "[::]:3903"
admin_token = "beenvoice_garage_admin_token_change_me_in_production"
metrics_token = "beenvoice_garage_metrics_token_change_me_in_production"
api_bind_addr = "[::]:${GARAGE_ADMIN_PORT:-3903}"
admin_token = "${GARAGE_ADMIN_TOKEN:-beenvoice_garage_admin_token_change_me_in_production}"
metrics_token = "${GARAGE_METRICS_TOKEN:-beenvoice_garage_metrics_token_change_me_in_production}"