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