update yml
This commit is contained in:
parent
1ed5cffe45
commit
f29e297afc
|
|
@ -1,9 +1,10 @@
|
||||||
version: '3.8'
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mongodb:
|
mongodb:
|
||||||
image: mongo:6.0
|
image: mongo:6.0
|
||||||
container_name: mongodb
|
container_name: mongodb
|
||||||
|
hostname: mongodb
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USERNAME:-admin}
|
- MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT_USERNAME:-admin}
|
||||||
|
|
@ -36,6 +37,7 @@ services:
|
||||||
mongo-express:
|
mongo-express:
|
||||||
image: mongo-express:latest
|
image: mongo-express:latest
|
||||||
container_name: mongo-express
|
container_name: mongo-express
|
||||||
|
hostname: mongo-express
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_ROOT_USERNAME:-admin}
|
- ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_ROOT_USERNAME:-admin}
|
||||||
|
|
@ -60,6 +62,10 @@ services:
|
||||||
networks:
|
networks:
|
||||||
mongo_network:
|
mongo_network:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
# Adding explicit configuration to ensure proper DNS resolution
|
||||||
|
ipam:
|
||||||
|
config:
|
||||||
|
- subnet: 172.20.0.0/16
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mongodb_data:
|
mongodb_data:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue