1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tandoor_ynh.git synced 2024-09-03 20:35:56 +02:00

fix config

This commit is contained in:
navanchauhan 2022-08-06 21:29:06 -04:00
parent d5900da9f8
commit de39719d4b
3 changed files with 27 additions and 14 deletions

View file

@ -7,7 +7,7 @@ SQL_DEBUG=0
TANDOOR_PORT=__PORT__
# hosts the application can run under e.g. recipes.mydomain.com,cooking.mydomain.com,...
ALLOWED_HOSTS=*
ALLOWED_HOSTS=__DOMAIN__
# random secret key, use for example `base64 /dev/urandom | head -c50` to generate one
# ---------------------------- REQUIRED -------------------------
@ -15,7 +15,7 @@ SECRET_KEY=__SECRETKEY__
# ---------------------------------------------------------------
# your default timezone See https://timezonedb.com/time-zones for a list of timezones
TIMEZONE=Europe/Berlin
TIMEZONE=America/Denver
# add only a database password if you want to run with the default postgres, otherwise change settings accordingly
DB_ENGINE=django.db.backends.postgresql
@ -28,10 +28,6 @@ POSTGRES_PASSWORD=__DB_PWD__
# ---------------------------------------------------------------
POSTGRES_DB=__DB_NAME__
# database connection string, when used overrides other database settings.
# format might vary depending on backend
# DATABASE_URL = engine://username:password@host:port/dbname
# the default value for the user preference 'fractions' (enable/disable fraction support)
# default: disabled=0
FRACTION_PREF_DEFAULT=0
@ -55,12 +51,12 @@ SCRIPT_NAME=__PATH__
# If staticfiles are stored at a different location uncomment and change accordingly, MUST END IN /
# this is not required if you are just using a subfolder
# This can either be a relative path from the applications base path or the url of an external host
# STATIC_URL=/static/
#sub_path_only STATIC_URL=__FINAL_PATH__/static/
# If mediafiles are stored at a different location uncomment and change accordingly, MUST END IN /
# this is not required if you are just using a subfolder
# This can either be a relative path from the applications base path or the url of an external host
# MEDIA_URL=/media/
#sub_path_only MEDIA_URL=__FINAL_PATH__/media/
# Serve mediafiles directly using gunicorn. Basically everyone recommends not doing this. Please use any of the examples
# provided that include an additional nxginx container to handle media file serving.
@ -155,7 +151,7 @@ LDAP_AUTH=1
AUTH_LDAP_SERVER_URI="ldap://localhost:389"
AUTH_LDAP_BIND_DN="ou=users,dc=yunohost,dc=org"
AUTH_LDAP_BIND_PASSWORD=""
AUTH_LDAP_USER_SEARCH_BASE_DN=""
AUTH_LDAP_USER_SEARCH_BASE_DN="dc=yunohost,dc=org"
#AUTH_LDAP_TLS_CACERTFILE=
# Enables exporting PDF (see export docs)

View file

@ -1,9 +1,14 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
proxy_set_header Host $http_host;
proxy_pass http://unix:__FINALPATH__/recipes.sock;
proxy_pass http://127.0.0.1:__PORT__;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
@ -19,4 +24,16 @@ location __PATH__/media {
alias __FINALPATH__/mediafiles;
}
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/api {
proxy_pass http://127.0.0.1:__PORT__;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}

View file

@ -6,11 +6,11 @@ After=network.target
Type=simple
Restart=always
RestartSec=3
User=recipes
User=__APP__
Group=www-data
WorkingDirectory=__FINALPATH__
EnvironmentFile=__FINALPATH__/.env
ExecStart=__FINALPATH__/venv/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind unix:__FINALPATH__/recipes.sock recipes.wsgi:application
ExecStart=__FINALPATH__/venv/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind 127.0.0.1:__PORT__ recipes.wsgi:application
[Install]
WantedBy=multi-user.target