[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_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() %}
|
{% macro tandoor_common() %}
|
||||||
location /static/ {
|
location /static {
|
||||||
alias /var/www/recipes/staticfiles;
|
alias {{var_tandoor_and_nginx_directory}}/program/staticfiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /media/ {
|
location /media {
|
||||||
alias /var/www/recipes/mediafiles;
|
alias {{var_tandoor_and_nginx_directory}}/program/mediafiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_set_header Host $http_host;
|
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;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
|
@ -15,6 +15,5 @@
|
||||||
"var_tandoor_authentication_data_authelia_url_base": "authelia.example.org",
|
"var_tandoor_authentication_data_authelia_url_base": "authelia.example.org",
|
||||||
"var_tandoor_authentication_data_authelia_label": "Authelia",
|
"var_tandoor_authentication_data_authelia_label": "Authelia",
|
||||||
"var_tandoor_secret_key": "REPLACE_ME",
|
"var_tandoor_secret_key": "REPLACE_ME",
|
||||||
"var_tandoor_port": 1256,
|
|
||||||
"var_tandoor_domain": "tandoor.exmaple.org"
|
"var_tandoor_domain": "tandoor.exmaple.org"
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
"libsasl2-dev",
|
"libsasl2-dev",
|
||||||
"python3-venv",
|
"python3-venv",
|
||||||
"python3-dev",
|
"python3-dev",
|
||||||
|
"gunicorn",
|
||||||
"nodejs",
|
"nodejs",
|
||||||
"yarnpkg"
|
"yarnpkg"
|
||||||
]
|
]
|
||||||
|
|
|
@ -42,7 +42,8 @@ SOCIALACCOUNT_PROVIDERS = {
|
||||||
SECRET_KEY={{var_tandoor_secret_key}}
|
SECRET_KEY={{var_tandoor_secret_key}}
|
||||||
|
|
||||||
ALLOWED_HOSTS={{var_tandoor_domain}}
|
ALLOWED_HOSTS={{var_tandoor_domain}}
|
||||||
TANDOOR_PORT={{var_tandoor_port | string}}
|
|
||||||
|
|
||||||
ENABLE_METRICS=0
|
ENABLE_METRICS=0
|
||||||
ENABLE_PDF_EXPORT=0
|
ENABLE_PDF_EXPORT=0
|
||||||
|
|
||||||
|
DEBUG=0
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Tandoor
|
Description=Tandoor (gunicorn daemon)
|
||||||
After=multi-user.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory={{var_tandoor_directory}}/program
|
Type=simple
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
User={{var_tandoor_user}}
|
User={{var_tandoor_user}}
|
||||||
Environment=VIRTUAL_ENV={{var_tandoor_directory}}/program
|
Group=www-data
|
||||||
ExecStart={{var_tandoor_directory}}/program/bin/python3 {{var_tandoor_directory}}/program/manage.py runserver
|
WorkingDirectory={{var_tandoor_directory}}/program
|
||||||
SyslogIdentifier=tandoor
|
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]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Add table
Reference in a new issue