Docker to production

This commit is contained in:
pycook
2019-11-10 19:06:38 +08:00
parent 046d0e60b7
commit 3fdfa4dc92
6 changed files with 27 additions and 36 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";
}
}

View File

@@ -11,10 +11,10 @@ SQLAlchemy ==1.3.5
PyMySQL ==0.9.3
redis ==3.2.1
# Migrations
Flask-Migrate ==2.5.2
Flask-Migrate == 2.5.2
# Deployment
gevent ==1.4.0
gunicorn>=19.1.1
gunicorn == 19.1.1
supervisor ==4.0.3
# Auth
Flask-Login ==0.4.1