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

Fixed exporter?

This commit is contained in:
orhtej2 2024-02-08 18:24:08 +01:00
parent 9c44fda14f
commit 74442d3c03
3 changed files with 14 additions and 7 deletions

5
conf/exporter.env Normal file
View file

@ -0,0 +1,5 @@
NODE_ENV=production
PENPOT_HTTP_SERVER_PORT=__PORT_EXPORTER__
PENPOT_HTTP_SERVER_host=127.0.0.1
PENPOT_PUBLIC_URI=https://__DOMAIN__
PENPOT_REDIS_URI=redis://127.0.0.1:6379/__REDIS_DB__

View file

@ -9,12 +9,9 @@ User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/exporter
ExecStart=__YNH_NODE__ app.js --http-server-port=__PORT__
ExecStart=__YNH_NODE__ --env-file=.env app.js
Restart=always
Environment=__YNH_NODE_LOAD_PATH__
Environment=NODE_ENV=production
Environment=PENPOT_PUBLIC_URI=https://__DOMAIN__
Environment=PENPOT_REDIS_URI=redis://127.0.0.1:6379:__REDIS_DB__
StandardOutput=append:/var/log/__APP__/__APP__-exporter.log
StandardError=inherit
Restart=on-failure

View file

@ -51,7 +51,8 @@ ynh_script_progression --message="Setting up source files..."
ynh_setup_source --dest_dir="$install_dir/build"
chown -R $app:$app "$install_dir"
chown -R $app:www-data "$install_dir"
chmod -R 755 "$install_dir"
#=================================================
# INSTALL APP
@ -157,15 +158,19 @@ ynh_add_config --template="environ" --destination="$install_dir/backend/environ"
chmod 400 "$install_dir/backend/environ"
chown $app:$app "$install_dir/backend/environ"
ynh_add_config --template="exporter.env" --destination="$install_dir/exporter/.env"
chmod 400 "$install_dir/exporter/.env"
chown $app:$app "$install_dir/exporter/.env"
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app-api --action="start" --log_path="/var/log/$app/$app-api.log" --line_match="welcome to penpot"
ynh_systemd_action --service_name=$app-backend --action="start" --log_path="/var/log/$app/$app-backend.log" --line_match="welcome to penpot"
#ynh_systemd_action --service_name=$app-proxy --action="start" --log_path="/var/log/$app/$app-proxy.log" --line_match="Running server!"
ynh_systemd_action --service_name=$app-exporter --action="start" --log_path="/var/log/$app/$app-exporter.log" --line_match="redis connection established"
#=================================================
# END OF SCRIPT