mirror of
https://github.com/YunoHost-Apps/distbin_ynh.git
synced 2024-09-03 18:26:10 +02:00
fix Services
This commit is contained in:
parent
06d9bf0e94
commit
f8f7609c6e
3 changed files with 8 additions and 4 deletions
|
@ -8,6 +8,9 @@ location __PATH__/ {
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
proxy_pass http://127.0.0.1:__PORT__/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
### Example PHP configuration (remove it if not used)
|
### Example PHP configuration (remove it if not used)
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
|
@ -8,7 +8,7 @@ User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
Environment="PATH=__ENV_PATH__"
|
Environment="PATH=__ENV_PATH__"
|
||||||
WorkingDirectory=__FINALPATH__/
|
WorkingDirectory=__FINALPATH__/
|
||||||
ExecStart=/bin/bash -c 'ts-node --project __FINALPATH__/tsconfig.json __FINALPATH__/bin/server.ts >> /var/log/__APP__/__APP__.log 2>&1'
|
ExecStart=/bin/bash -c '__FINALPATH__/node_modules/.bin/ts-node --project __FINALPATH__/tsconfig.json __FINALPATH__/bin/server.ts >> /var/log/__APP__/__APP__.log 2>&1'
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -244,8 +244,8 @@ ynh_add_systemd_config
|
||||||
|
|
||||||
### `ynh_replace_string` is used to replace a string in a file.
|
### `ynh_replace_string` is used to replace a string in a file.
|
||||||
### (It's compatible with sed regular expressions syntax)
|
### (It's compatible with sed regular expressions syntax)
|
||||||
|
cp ../conf/package.json "$final_path/package.json"
|
||||||
#ynh_replace_string "match_string" "replace_string" "$final_path/CONFIG_FILE"
|
ynh_replace_string "__PORT__" "$port" "$final_path/package.json"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
|
@ -256,7 +256,7 @@ ynh_add_systemd_config
|
||||||
### you can make a backup of this file before modifying it again if the admin had modified it.
|
### you can make a backup of this file before modifying it again if the admin had modified it.
|
||||||
|
|
||||||
# Calculate and store the config file checksum into the app settings
|
# Calculate and store the config file checksum into the app settings
|
||||||
#ynh_store_file_checksum "$final_path/CONFIG_FILE"
|
ynh_store_file_checksum "$final_path/package.json"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
@ -318,3 +318,4 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
systemctl reload $app
|
||||||
|
|
Loading…
Add table
Reference in a new issue