12-23-上传master
This commit is contained in:
14
docker/docker-compose.dev.yml
Normal file
14
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
docker/docker-compose.yml
Normal file
21
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:
|
21
docker/nginx.conf
Normal file
21
docker/nginx.conf
Normal file
@ -0,0 +1,21 @@
|
||||
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;
|
||||
include /etc/nginx/mime.types;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
location /api {
|
||||
proxy_pass https://proapi.azurewebsites.net;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user