This website is built with Flask
docker run -d --restart always --name qzgs -v YOUR_STATIC_FOLDER:/opt/web/app/static -p 9002:8000 qzgsme/web-flask
For nginx conf file, see below:
server {
listen 80;
server_name www.example.com;
access_log /var/log/nginx/example.log;
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /assets/ {
autoindex on;
root YOUR_STATIC_FOLDER; # path not contain /asstes/, use parent folder
}
location ~* \.(jpg|gif|png|ico|pdf) {
add_header Cache-Control public;
add_header Cache-Control must-revalidate;
expires 7d;
}
}
Flask
meinheld
Docker
change static_url_path to root folder
use factory model to init Flask app
use meinheld to backend Flask app
Content type
Image
Digest
Size
21.1 MB
Last updated
about 9 years ago
docker pull qzgsme/got