Docker to production

This commit is contained in:
pycook
2019-11-10 19:06:38 +08:00
parent 5a749ee121
commit d1b8408c59
7 changed files with 37 additions and 41 deletions

View File

@@ -25,9 +25,12 @@ server {
application/xml
application/rss+xml
image/svg+xml;
root /etc/nginx/html;
location / {
proxy_pass http://${CMDB_UI_HOST};
proxy_set_header Host $host;
root /etc/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://${CMDB_API_HOST};
@@ -41,4 +44,11 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~* \.(css|js)$ {
access_log off;
add_header Pragma public;
add_header Cache-Control "public, max-age=7776000";
#add_header Cache-Control "public,no-cache, max-age=0";
add_header X-Asset "yes";
}
}