docker yml文件 启动mysql+mongo+mongo-express

本文档介绍了如何在Docker中配置YAML文件以同时启动MySQL、MongoDB和Mongo-Express。重点强调了Mongo-Express的参数设置,特别是当ME_CONFIG_MONGODB_ENABLE_ADMIN为“false”时的参数。还提醒注意,当MongoDB容器声明了networks字段,Mongo-Express需保持一致,以确保在同一网络中,否则可能无法通过container_name正确访问。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

文档参数

先看看mongo-express的docker文档,熟悉参数很重要:

Name Default Description
ME_CONFIG_BASICAUTH_USERNAME ‘’ mongo-express web username
ME_CONFIG_BASICAUTH_PASSWORD ‘’ mongo-express web password
ME_CONFIG_MONGODB_ENABLE_ADMIN ‘true’ Enable admin access to all databases. Send strings: "true" or "false"
ME_CONFIG_MONGODB_ADMINUSERNAME ‘’ MongoDB admin username
ME_CONFIG_MONGODB_ADMINPASSWORD ‘’ MongoDB admin password
ME_CONFIG_MONGODB_PORT 27017 MongoDB port
ME_CONFIG_MONGODB_SERVER ‘mongo’ MongoDB container name. Use comma delimited list of host names for replica sets.
ME_CONFIG_OPTIONS_EDITORTHEME ‘default’ mongo-express editor color theme, more here
ME_CONFIG_REQUEST_SIZE ‘100kb’ Maximum payload size. CRUD operations above this size will fail in body-parser.
ME_CONFIG_SITE_BASEURL ‘/’ Set the baseUrl to ease mounting at a subdirectory. Remember to include a leading and trailing slash.
ME_CONFIG_SITE_COOKIESECRET ‘cookiesecret’ String used by cookie-parser middleware to sign cookies.
ME_CONFI
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值