网站首页 网站源码
后续版本将会删除Swashbuckle ,参见
以后将使用scalar代替
cd /home/ubuntu/project/dpz.core
git pull
cd /home/ubuntu/project/dpz.core/src
### 生产环境
sudo docker build -t dpz.webapi -f Dpz.Core.WebApi/Dockerfile .
sudo docker run --restart=always \
--name dpz.webapi \
-e TZ=Asia/Shanghai \
-v /home/ubuntu/project/dpz.core:/app/code \
-p 2376:8080 \
-d dpz.webapi:latest
# 预发布
sudo docker build -t dpz.webapi.staging -f Dpz.Core.WebApi/Dockerfile .
sudo docker run --restart=always \
--name dpz.webapi.staging \
-e "AgileConfig:env=STAGING" \
-e "WebApiHangfireCollectionPrefix=STAGING_WebAPI" \
-e TZ=Asia/Shanghai \
-v /home/ubuntu/project/dpz.core:/app/code \
-p 3509:8080 \
-d dpz.webapi.staging:latest
server {
listen 80;
server_name api.dpangzi.com;
if ( $host != 'api.dpangzi.com' ) {
return 403;
}
location / {
proxy_pass http://localhost:2376;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}