update on nginx config and service file

watermarks_url_path
Castro0o 5 years ago
parent 5b4ef9e1dd
commit 6fd437363a

@ -30,7 +30,7 @@ User=psc
Group=www-data Group=www-data
WorkingDirectory=/var/www/TacticalApp WorkingDirectory=/var/www/TacticalApp
Environment="PATH=/var/www/TacticalApp/venv/bin" Environment="PATH=/var/www/TacticalApp/venv/bin"
ExecStart=/var/www/TacticalApp/venv/bin/gunicorn --workers 4 --bind unix:app.sock -m 007 app:app ExecStart=/var/www/TacticalApp/venv/bin/gunicorn --env SCRIPT_NAME=/watermarks --workers 4 --bind unix:app.sock -m 007 app:app
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
@ -48,12 +48,10 @@ It is also a good idea to check the status of the service
``` ```
location / { location / {
include proxy_params; # if using gunicorn with app sock, use:
# it will pass the requests to the socket
proxy_pass http://unix:/var/www/TacticalApp/app.sock; proxy_pass http://unix:/var/www/TacticalApp/app.sock;
# @andre: unsure whether we need a proxy_redirect as well # if using gunicord with port 5000, use:
# if so, it might be somthing like proxy_pass http://127.0.0.1:5000;
# http://unix:/var/www/TacticalApp/app.sock $scheme://$host:80/;
} }
``` ```
@ -86,3 +84,5 @@ But in the long run logging should be disabled
* added page /test `watermarks/test` for testing url_for() - correct * added page /test `watermarks/test` for testing url_for() - correct
* made urls relative * made urls relative
* service file with `--env SCRIPT_NAME=/watermarks` see above
*

Loading…
Cancel
Save