1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rocketchat_ynh.git synced 2024-09-03 20:16:25 +02:00

Adds capability to run in a subfolder

This commit is contained in:
Selamanse 2017-07-19 12:49:06 +02:00
parent 53dac86ed5
commit de0adfc3e7
2 changed files with 13 additions and 12 deletions

View file

@ -1,19 +1,19 @@
[Unit] [Unit]
Description=Rocket.Chat Description=Rocket.Chat
After=network.target After=network.target
[Service] [Service]
Type=simple Type=simple
WorkingDirectory=/var/www/rocketchat WorkingDirectory=/var/www/rocketchat
User=www-data User=www-data
Group=www-data Group=www-data
ExecStart=/usr/local/bin/node main.js ExecStart=/usr/local/bin/node main.js
Restart=always Restart=always
SyslogIdentifier=Rocket.Chat SyslogIdentifier=Rocket.Chat
Environment="BIND_IP=127.0.0.1" Environment="BIND_IP=127.0.0.1"
Environment="ROOT_URL=https://CHANGEMETOROOTURL" Environment="ROOT_URL=https://#ROOTURL##LOCATION#"
Environment="PORT=3000" Environment="PORT=3000"
Environment="MONGO_URL=mongodb://localhost:27017/rocketchat" Environment="MONGO_URL=mongodb://localhost:27017/rocketchat"
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -61,7 +61,8 @@ ynh_app_setting_set $app final_path $final_path
sudo mkdir -p $final_path sudo mkdir -p $final_path
# Copy and set systemd configuration # Copy and set systemd configuration
sed -i "s@CHANGEMETOROOTURL@$domain/@g" ../conf/Rocketchat.service sed -i "s@#ROOTURL#@$domain/@g" ../conf/Rocketchat.service
sed -i "s@#LOCATION#@/${path}@g" ../conf/Rocketchat.service
sudo cp ../conf/Rocketchat.service /etc/systemd/system/ sudo cp ../conf/Rocketchat.service /etc/systemd/system/
sudo systemctl daemon-reload sudo systemctl daemon-reload