[task-230] [fix] tandoor stuff
This commit is contained in:
parent
6ce4717a45
commit
46a1a98751
6 changed files with 21 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"var_tandoor_and_nginx_domain": "tandoor.example.org",
|
||||
"var_tandoor_and_nginx_port": 1256,
|
||||
"var_tandoor_and_nginx_tls_mode": "force"
|
||||
"var_tandoor_and_nginx_tls_mode": "force",
|
||||
"var_tandoor_and_nginx_directory": "/opt/tandoor"
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{% macro tandoor_common() %}
|
||||
location /static/ {
|
||||
alias /var/www/recipes/staticfiles;
|
||||
location /static {
|
||||
alias {{var_tandoor_and_nginx_directory}}/program/staticfiles;
|
||||
}
|
||||
|
||||
location /media/ {
|
||||
alias /var/www/recipes/mediafiles;
|
||||
location /media {
|
||||
alias {{var_tandoor_and_nginx_directory}}/program/mediafiles;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_pass http://unix:/var/www/recipes/recipes.sock;
|
||||
proxy_pass http://unix:{{var_tandoor_and_nginx_directory}}/program/recipes.sock;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
{% endmacro %}
|
||||
|
|
|
@ -15,6 +15,5 @@
|
|||
"var_tandoor_authentication_data_authelia_url_base": "authelia.example.org",
|
||||
"var_tandoor_authentication_data_authelia_label": "Authelia",
|
||||
"var_tandoor_secret_key": "REPLACE_ME",
|
||||
"var_tandoor_port": 1256,
|
||||
"var_tandoor_domain": "tandoor.exmaple.org"
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"libsasl2-dev",
|
||||
"python3-venv",
|
||||
"python3-dev",
|
||||
"gunicorn",
|
||||
"nodejs",
|
||||
"yarnpkg"
|
||||
]
|
||||
|
|
|
@ -42,7 +42,8 @@ SOCIALACCOUNT_PROVIDERS = {
|
|||
SECRET_KEY={{var_tandoor_secret_key}}
|
||||
|
||||
ALLOWED_HOSTS={{var_tandoor_domain}}
|
||||
TANDOOR_PORT={{var_tandoor_port | string}}
|
||||
|
||||
ENABLE_METRICS=0
|
||||
ENABLE_PDF_EXPORT=0
|
||||
|
||||
DEBUG=0
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
[Unit]
|
||||
Description=Tandoor
|
||||
After=multi-user.target
|
||||
Description=Tandoor (gunicorn daemon)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory={{var_tandoor_directory}}/program
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
User={{var_tandoor_user}}
|
||||
Environment=VIRTUAL_ENV={{var_tandoor_directory}}/program
|
||||
ExecStart={{var_tandoor_directory}}/program/bin/python3 {{var_tandoor_directory}}/program/manage.py runserver
|
||||
SyslogIdentifier=tandoor
|
||||
Group=www-data
|
||||
WorkingDirectory={{var_tandoor_directory}}/program
|
||||
EnvironmentFile={{var_tandoor_directory}}/program/.env
|
||||
ExecStart={{var_tandoor_directory}}/program/bin/gunicorn --error-logfile {{var_tandoor_directory}}/program/gunicorn_err.log --log-level info --capture-output --bind unix:{{var_tandoor_directory}}/program/recipes.sock recipes.wsgi:application
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Add table
Reference in a new issue