Files
wzdj/new/wz-api/.env.docker.example

16 lines
660 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 本地 Docker Mongo官方镜像、未启用 --auth 时)
# 与仓库曾用的容器名一致,便于沿用脚本/习惯:
#
# docker stop wanzhi-mongodb 2>nul & docker rm wanzhi-mongodb 2>nul
# docker run -d --name wanzhi-mongodb -p 27017:27017 mongo:7
#
# 连接串(库名 wz与 seedmongo / wz-api 默认一致):
MONGODB_URI=mongodb://127.0.0.1:27017/wz
# 若使用 docker run -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=secret
# MONGODB_URI=mongodb://root:secret@127.0.0.1:27017/wz?authSource=admin
# 初始化索引与演示数据:
# set MONGODB_URI=mongodb://127.0.0.1:27017/wz
# go run ./cmd/seedmongo