Skip to content

Instantly share code, notes, and snippets.

@pseudo-usama
Last active August 18, 2025 10:31
Show Gist options
  • Select an option

  • Save pseudo-usama/225f9ed6eed9be87bde4ac4ad7022a94 to your computer and use it in GitHub Desktop.

Select an option

Save pseudo-usama/225f9ed6eed9be87bde4ac4ad7022a94 to your computer and use it in GitHub Desktop.
version: "3.9"
services:
mongo-express:
image: mongo-express:latest
container_name: mongo-express
restart: unless-stopped
ports:
- "8081:8081"
environment:
# Connection settings for your remote DB
ME_CONFIG_MONGODB_SERVER: your.remote.mongo.host
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
ME_CONFIG_MONGODB_ADMINUSERNAME: yourUser
ME_CONFIG_MONGODB_ADMINPASSWORD: yourPass
# Connection String
# ME_CONFIG_MONGODB_URL: your_string
# Optional: secure the web dashboard with basic auth
ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: admin
# If your remote DB requires TLS/SSL
# ME_CONFIG_MONGODB_SSL: "true"
docker compose up -d
docker compose down
docker compose up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment