Skip to content

Instantly share code, notes, and snippets.

@payne
Created July 20, 2023 20:03
Show Gist options
  • Save payne/b3afa5848d04f15b607ab99958aac79e to your computer and use it in GitHub Desktop.
Save payne/b3afa5848d04f15b607ab99958aac79e to your computer and use it in GitHub Desktop.
docker compose only accept connection requests from 127.0.0.1
version: '3.8'
services:
redis-stack:
image: redis/redis-stack:latest
# https://stackoverflow.com/questions/45109398/how-can-i-make-docker-compose-bind-the-containers-only-on-defined-network-instea
# This techinque makes it so http://R.MattPayne.org:8001 fails on the Internet
# But after `ssh R.MattPayne.org -L 8001:127.0.0.1:8001`
# http://127.0.0.1:8001/ works great :-)
ports:
- "127.0.0.1:6379:6379"
- "127.0.0.1:8001:8001"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment