1 Star 7 Fork 1

Mr Zhang/nest-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.prod.yml 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
19983467897 提交于 2025-04-16 21:59 +08:00 . feat: update
# 这些配置,如数据库密码等 请根据实际情况修改
services:
nest-admin:
build: .
extra_hosts:
- 'host.docker.internal:host-gateway' # 服务器上需使用 host.docker.internal
ports:
- '3000:3000'
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
environment:
- DB_HOST=db # docker 内部没有 ip
- DB_PORT=3306
- DB_USER=root
- DB_PASSWORD=12345678
- DB_DATABASE=nest_admin
- REDIS_HOST=redis
- REDIS_PORT=6379
- TZ=Asia/Shanghai
db:
image: mysql:8
volumes:
- db_data:/var/lib/mysql
- ./sql:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=12345678
- MYSQL_DATABASE=nest_admin # 这里的数据库就是 我们的表名称
- TZ=Asia/Shanghai # 设置时区为亚洲/上海
ports:
- '3306:3306'
healthcheck:
test:
[
'CMD',
'mysqladmin',
'ping',
'-h',
'localhost',
'-u',
'root',
'--password=12345678',
]
interval: 10s
retries: 5
redis:
image: redis:7.4.1
ports:
- '6379:6379'
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
retries: 5
volumes:
db_data:
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/mrzym/nest-admin.git
git@gitee.com:mrzym/nest-admin.git
mrzym
nest-admin
nest-admin
master

搜索帮助