Exposed mongo through traefik instead of having it handled through raw ports
This commit is contained in:
@ -8,8 +8,14 @@ services:
|
||||
container_name: mongoDB
|
||||
volumes:
|
||||
- ./mongo/:/data/db
|
||||
ports:
|
||||
- "27017:27017"
|
||||
networks:
|
||||
- proxy
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.tcp.routers.mongodb.rule=HostSNI(`*`)"
|
||||
- "traefik.tcp.routers.mongodb.entrypoints=mongo"
|
||||
- "traefik.tcp.routers.mongodb.service=mongodb"
|
||||
- "traefik.tcp.services.mongodb.loadbalancer.server.port=27017"
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: root
|
||||
MONGO_INITDB_ROOT_PASSWORD: rootpassword
|
||||
|
Reference in New Issue
Block a user