1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tandoor_ynh.git synced 2024-09-03 20:35:56 +02:00
This commit is contained in:
navanchauhan 2022-08-06 17:23:06 -04:00
parent f5dd425bd8
commit 1400784e9b
3 changed files with 20 additions and 24 deletions

View file

@ -1,28 +1,22 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __FINALPATH__/;
### Example PHP configuration (remove it if not used)
index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M;
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
### End of PHP configuration part
proxy_set_header Host $http_host;
proxy_pass http://unix:__FINALPATH__/recipes.sock;
proxy_set_header X-Forwarded-Proto $scheme;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/static {
alias __FINALPATH__/staticfiles;
}
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/media {
alias __FINALPATH__/mediafiles;
}

View file

@ -8,9 +8,9 @@ Restart=always
RestartSec=3
User=recipes
Group=www-data
WorkingDirectory=__FINAL_PATH__
EnvironmentFile=__FINAL_PATH__/.env
ExecStart=__FINAL_PATH__/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind unix:__FINAL_PATH__/recipes.sock recipes.wsgi:application
WorkingDirectory=__FINALPATH__
EnvironmentFile=__FINALPATH__/.env
ExecStart=__FINALPATH__/bin/gunicorn --error-logfile /tmp/gunicorn_err.log --log-level debug --capture-output --bind unix:__FINALPATH__/recipes.sock recipes.wsgi:application
[Install]
WantedBy=multi-user.target

View file

@ -151,6 +151,8 @@ popd
pushd "$final_path"
ynh_exec_as $app "$final_path/venv/bin/python3" manage.py migrate
ynh_psql_connect_as $db_user $db_pwd <<< "ALTER USER $app WITH NOSUPERUSER;"
ynh_exec_as $app "$final_path/venv/bin/python3" manage.py collectstatic --no-input
ynh_exec_as $app "$final_path/venv/bin/python3" manage.py collectstatic_js_reverse
popd