This repository was archived by the owner on Dec 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
使用独立的MongoDB #1
Labels
Comments
@chengpeixin
修改docker-compose.yml文件为
|
好的,非常感谢 |
Closed
其实我想用你的镜像,能够直接加 mongoDB 数据库账号和密码,目前用的镜像,数据库就得公开无密码,你的docker-compose.yml加多这两个选项可以么,不想自己还去build镜像,就是想直接用你的 |
我尝试修改一下。
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: ioy ***@***.***>
发送时间: 2021年7月1日 16:49
收件人: jinfeijie/yapi ***@***.***>
抄送: fj jin ***@***.***>, State change ***@***.***>
主题: 回复:[jinfeijie/yapi] 使用独立的MongoDB (#1)
@chengpeixin
down完代码后,修改config.json里面的db的内容为如下格式,数据改成你自己的。
"db": { "servername": "127.0.0.1", "DATABASE": "yapi", "port": 27017, "user": "test1", "pass": "test1", "authSource": "" },
修改docker-compose.yml文件为
version: '2.1' services: yapi: image: mrjin/yapi:latest # build: ./ container_name: yapi environment: - VERSION=1.5.6 - LOG_PATH=/tmp/yapi.log - HOME=/home - PORT=3000 - ADMIN_EMAIL=<你的管理员邮箱> # - DB_SERVER=<mongoDB的地址> # - DB_NAME=<对应的DBName> # - DB_PORT=<mongoDB的端口> # restart: always ports: - 127.0.0.1:3000:3000 volumes: - ~/data/yapi/log/yapi.log:/home/vendors/log # log dir entrypoint: "bash entrypoint.sh" networks: - back-net networks: back-net: external: true
其实我想用你的镜像,能够直接加 mongoDB 数据库账号和密码,目前用的镜像,数据库就得公开无密码,你的docker-compose.yml加多这两个选项可以么,不想自己还去build镜像,就是想直接用你的
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
你好,我使用的我自己的数据库,在启动时需要进行验证,这部分在环境变量中可以配置么?
The text was updated successfully, but these errors were encountered: