Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Update Docker Compose configuration to restrict service ports to localhost

Bill Yang9ecd1e4e7652
diff --git a/docker-compose.yml b/docker-compose.yml
index 3bb914a53..b885d4ddf 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -44,6 +44,9 @@ services:
retries: 5
start_period: 10s
restart: unless-stopped
+ ports:
+ # Localhost-only: reach from outside via SSH tunnel (ssh -N -L 8123:localhost:8123 <host>)
+ - "127.0.0.1:8123:8123"
postgres:
image: postgres:17.4
@@ -62,11 +65,15 @@ services:
start_period: 10s
restart: unless-stopped
ports:
- - "5432:5432"
+ # Localhost-only: reach from outside via SSH tunnel
+ - "127.0.0.1:5432:5432"
redis:
image: redis:8.6.4-alpine
container_name: redis
+ ports:
+ # Localhost-only: reach from outside via SSH tunnel
+ - "127.0.0.1:6379:6379"
volumes:
- redis-data:/data
healthcheck: