30 lines
592 B
YAML
30 lines
592 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
mongodb:
|
|
image: mongo:latest
|
|
container_name: mongodb
|
|
restart: always
|
|
volumes:
|
|
- mongo_data:/data/db
|
|
ports:
|
|
- "27017:27017"
|
|
|
|
mongo-express:
|
|
image: mongo-express
|
|
container_name: mongo-express
|
|
restart: always
|
|
ports:
|
|
- "8081:8081"
|
|
environment:
|
|
ME_CONFIG_MONGODB_SERVER: mongodb
|
|
ME_CONFIG_MONGODB_PORT: 27017
|
|
ME_CONFIG_MONGODB_ENABLE_ADMIN: "true"
|
|
ME_CONFIG_BASICAUTH_USERNAME: admin
|
|
ME_CONFIG_BASICAUTH_PASSWORD: admin123
|
|
depends_on:
|
|
- mongodb
|
|
|
|
volumes:
|
|
mongo_data:
|