Docker dynamic publish support. (#2903)

* feat: Docker support, including dynamic publish

* fix:  run container command
This commit is contained in:
胤玄
2023-07-06 13:55:41 +08:00
committed by GitHub
parent 5ad5c8cdc7
commit c659c14c5a
10 changed files with 147 additions and 15 deletions

View File

@@ -86,6 +86,24 @@ pnpm serve
pnpm build
```
- docker
### The dockerFile is located in the project root directory and supports differential deployment
#### build image
```bash
docker build -t vue-vben-admin .
```
#### Environment variables are dynamically used to achieve differentiated container deployment. Different VG_BASE_URL environment variables point to different back-end service addresses. In the following example, http://localhost:3333 is used as the back-end service address and the container is mapped to port 6666
```bash
docker run --name vue-vben-admin -d -p 6666:80 -e VG_BASE_URL=http://localhost:3333 vue-vben-admin
```
Then you can navigate http://localhost:6666
## Change Log
[CHANGELOG](./CHANGELOG.zh_CN.md)