opti: build docker file

This commit is contained in:
louis 2024-04-07 10:19:46 +08:00
parent 1399835845
commit 9eba27e814
1 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,10 @@ services:
- 'host.docker.internal:host-gateway' - 'host.docker.internal:host-gateway'
ports: ports:
- '${APP_PORT}:${APP_PORT}' - '${APP_PORT}:${APP_PORT}'
volumes:
# 将容器中huaxin-admin/dist文件夹映射到本地的dist文件夹
- ./public:/huaxin-admin/public
- ./node_modules:/huaxin-admin/node_modules
# 当前服务启动之前先要把depends_on指定的服务启动起来才行 # 当前服务启动之前先要把depends_on指定的服务启动起来才行
depends_on: depends_on:
- mysql - mysql