Skip to content

Instantly share code, notes, and snippets.

@im4aLL
Created March 26, 2024 16:04
Show Gist options
  • Save im4aLL/2f8460fabb795a315ecc5e3e2457cc0e to your computer and use it in GitHub Desktop.
Save im4aLL/2f8460fabb795a315ecc5e3e2457cc0e to your computer and use it in GitHub Desktop.
docker compose file for mongo, mongo-expres, redis and redis-commander
version: '3.8'
services:
mongo:
image: mongo:latest
volumes:
- ./.data/mongodb:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: 123456
mongo-express:
image: mongo-express
volumes:
- ./.data/mongodb:/data/db
ports:
- 8081:8081
environment:
ME_CONFIG_BASICAUTH_USERNAME: root
ME_CONFIG_BASICAUTH_PASSWORD: 123456
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: 123456
ME_CONFIG_MONGODB_URL: mongodb://root:123456@mongo:27017/
redis:
image: redis:latest
command: redis-server --requirepass 123456
ports:
- "6379:6379"
volumes:
- ./.dаta/redis:/root/redis
environment:
- REDIS_PASSWORD=123456
- REDIS_PORT=6379
redis-commander:
image: ghcr.io/joeferner/redis-commander:latest
environment:
REDIS_HOSTS: redis
REDIS_HOST: redis
REDIS_PORT: redis:6379
REDIS_PASSWORD: 123456
HTTP_USER: root
HTTP_PASSWORD: 123456
ports:
- "8082:8081"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment