Skip to content

Instantly share code, notes, and snippets.

@emregeldegul
Created January 31, 2021 09:03
Show Gist options
  • Save emregeldegul/1699feda6080370731db192b543c90d9 to your computer and use it in GitHub Desktop.
Save emregeldegul/1699feda6080370731db192b543c90d9 to your computer and use it in GitHub Desktop.
server {
server_name <ip>;
location /static {
alias /home/<folder>/<project>/app/static;
}
location / {
proxy_pass http://localhost:<port>;
include /etc/nginx/proxy_params;
proxy_redirect off;
}
}
# Nginx Conf For Flask
[program:<app name>]
directory=/home/<home>/<project>
command=/home/<home>/<project>/venv/bin/gunicorn -w 3 run:app -b 0.0.0.0:90$
user=<user>
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
stderr_logfile=/var/log/<project>.err.log
stdout_logfile=/var/log/<project>.out.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment