1 Star 0 Fork 70

未定义/nest-admin

forked from buqiyuan/nest-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 2.01 KB
一键复制 编辑 原始数据 按行查看 历史
version: '3'
services:
nest-admin-web:
image: buqiyuan/vue3-antdv-admin:stable
container_name: nest-admin-web
volumes:
- ./deploy/web:/etc/nginx/conf.d
ports:
- '80:80'
restart: always
networks:
- nest_admin_net
mysql:
image: mysql:latest
container_name: nest-admin-mysql
restart: always
env_file:
- .env
- .env.production
environment:
- MYSQL_HOST=${DB_HOST}
- MYSQL_PORT=${DB_PORT}
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USERNAME=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
ports:
- '${DB_PORT}:3306'
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci # 设置utf8字符集
volumes:
- ./__data/mysql/:/var/lib/mysql/ # ./__data/mysql/ 路径可以替换成自己的路径
- ./deploy/sql/:/docker-entrypoint-initdb.d/ # 初始化的脚本,若 ./__data/mysql/ 文件夹存在数据,则不会执行初始化脚本
networks:
- nest_admin_net
redis:
image: redis:alpine
container_name: nest-admin-redis
restart: always
env_file:
- .env
- .env.production
ports:
- '${REDIS_PORT}:6379'
command: >
--requirepass ${REDIS_PASSWORD}
networks:
- nest_admin_net
nest-admin-server:
# build: 从当前路径构建镜像
build:
context: .
args:
- PROJECT_DIR=${PROJECT_DIR}
image: buqiyuan/nest-admin-server:stable
container_name: nest-admin-server
restart: always
env_file:
- .env
- .env.production
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '${APP_PORT}:${APP_PORT}'
volumes:
- ./logs/:${PROJECT_DIR}/logs/ # ./logs 日志文件挂载到容器外部
# 当前服务启动之前先要把depends_on指定的服务启动起来才行
depends_on:
- mysql
- redis
networks:
- nest_admin_net
networks:
nest_admin_net:
name: nest_admin_net
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/loyalove/nest-admin.git
[email protected]:loyalove/nest-admin.git
loyalove
nest-admin
nest-admin
main

搜索帮助