初始化 antd-pro
This commit is contained in:
14
admin-web/docker/docker-compose.dev.yml
Normal file
14
admin-web/docker/docker-compose.dev.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
version: "3.5"
|
||||
|
||||
services:
|
||||
ant-design-pro_dev:
|
||||
ports:
|
||||
- 8000:8000
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: Dockerfile.dev
|
||||
container_name: "ant-design-pro_dev"
|
||||
volumes:
|
||||
- ../src:/usr/src/app/src
|
||||
- ../config:/usr/src/app/config
|
||||
- ../mock:/usr/src/app/mock
|
||||
21
admin-web/docker/docker-compose.yml
Normal file
21
admin-web/docker/docker-compose.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
version: "3.5"
|
||||
|
||||
services:
|
||||
ant-design-pro_build:
|
||||
build: ../
|
||||
container_name: "ant-design-pro_build"
|
||||
volumes:
|
||||
- dist:/usr/src/app/dist
|
||||
|
||||
ant-design-pro_web:
|
||||
image: nginx
|
||||
ports:
|
||||
- 80:80
|
||||
container_name: "ant-design-pro_web"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- dist:/usr/share/nginx/html:ro
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
|
||||
volumes:
|
||||
dist:
|
||||
22
admin-web/docker/nginx.conf
Normal file
22
admin-web/docker/nginx.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
server {
|
||||
listen 80;
|
||||
# gzip config
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 9;
|
||||
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
|
||||
gzip_vary on;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
location /api {
|
||||
proxy_pass https://preview.pro.ant.design;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user