1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/petrolette_ynh.git synced 2024-09-03 19:56:26 +02:00

use port name for http_port

This commit is contained in:
Tobias Ollive 2021-04-07 10:22:07 +02:00
parent d88a52a931
commit fa96f09938
4 changed files with 7 additions and 7 deletions

View file

@ -1,5 +1,5 @@
location / {
proxy_pass http://localhost:__PORT_HTTP__/;
proxy_pass http://localhost:__PORT__/;
proxy_set_header Host $host;
proxy_buffering off;
}

View file

@ -4,7 +4,7 @@ After=network.target
[Service]
Type=simple
Environment="PTL_PORT_HTTP=__HTTP_PORT__"
Environment="PTL_PORT_HTTP=__PORT__"
Environment="__YNH_NODE_LOAD_PATH__"
User=__APP__
Group=__APP__

View file

@ -56,9 +56,9 @@ ynh_app_setting_set --app=$app --key=path_url --value=$path_url
ynh_script_progression --message="Finding an available port..."
# Find an available port
http_port=$(ynh_find_port --port=8001)
port=$(ynh_find_port --port=8001)
https_port=$(ynh_find_port --port=8002)
ynh_app_setting_set --app=$app --key=http_port --value=$http_port
ynh_app_setting_set --app=$app --key=port --value=$port
ynh_app_setting_set --app=$app --key=https_port --value=$https_port
#=================================================
@ -83,7 +83,7 @@ ynh_setup_source --dest_dir="$final_path"
ynh_script_progression --message="Configuring nginx web server..."
# Create a dedicated nginx config
ynh_add_nginx_config http_port
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
@ -123,7 +123,7 @@ yunohost service add $app --description="The news reader that doesn't know you"
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config --others_var="http_port ynh_node_load_PATH"
ynh_add_systemd_config --others_var="port ynh_node_load_PATH"
#=================================================
# START SYSTEMD SERVICE

View file

@ -19,7 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
http_port=$(ynh_app_setting_get --app=$app --key=http_port)
port=$(ynh_app_setting_get --app=$app --key=port)
https_port=$(ynh_app_setting_get --app=$app --key=https_port)
#=================================================