mirror of
https://github.com/YunoHost-Apps/turtl_ynh.git
synced 2024-09-03 20:26:35 +02:00
Fix
This commit is contained in:
parent
9d02f5b51b
commit
77cca7756f
3 changed files with 17 additions and 6 deletions
|
@ -2,21 +2,21 @@
|
||||||
server:
|
server:
|
||||||
# Per default, turtl will listen on all IP addresses
|
# Per default, turtl will listen on all IP addresses
|
||||||
# You can choose the IP it will use with this parameter
|
# You can choose the IP it will use with this parameter
|
||||||
host:
|
host: _IP_SERVER__
|
||||||
port: __PORT__
|
port: __PORT__
|
||||||
|
|
||||||
db:
|
db:
|
||||||
connstr: 'postgres://__DB_USER__:__DB_PWD__@127.0.0.1:5432/__DB_NAME__'
|
connstr: 'postgres://__DB_USER__:__DB_PWD__@127.0.0.1:5432/__DB_NAME__'
|
||||||
pool: 24
|
pool: 24
|
||||||
|
|
||||||
loglevel: 'debug'
|
loglevel: 'info'
|
||||||
|
|
||||||
app:
|
app:
|
||||||
# ALWAYS false in production. Always.
|
# ALWAYS false in production. Always.
|
||||||
# Set to 'I UNDERSTAND THIS VIOLATES THE PRIVACY OF MY USERS' to enable
|
# Set to 'I UNDERSTAND THIS VIOLATES THE PRIVACY OF MY USERS' to enable
|
||||||
enable_bookmarker_proxy: false
|
enable_bookmarker_proxy: false
|
||||||
# no trailing slash
|
# no trailing slash
|
||||||
api_url: 'http://api.__DOMAIN__:8181'
|
api_url: 'https://__DOMAIN__'
|
||||||
www_url: 'https://__DOMAIN__'
|
www_url: 'https://__DOMAIN__'
|
||||||
login:
|
login:
|
||||||
# Max failed login attemps. Set to -1 to disable
|
# Max failed login attemps. Set to -1 to disable
|
||||||
|
|
|
@ -1,15 +1,22 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Note taking service
|
Description=Turtl Server: Note taking service
|
||||||
Documentation=https://turtlapp.com/
|
Documentation=https://turtlapp.com/
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/
|
WorkingDirectory=__FINALPATH__/
|
||||||
Environment="PATH=__ENV_PATH__"
|
Environment="PATH=__ENV_PATH__"
|
||||||
ExecStart=__YNH_NODE__ __FINALPATH__/server.js
|
ExecStart=__YNH_NODE__ __FINALPATH__/entrypoint.sh
|
||||||
Restart=on-failure
|
StandardOutput=syslog
|
||||||
|
StandardError=syslog
|
||||||
|
SyslogIdentifier=turtl
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10
|
||||||
|
StartLimitInterval=900
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -97,6 +97,9 @@ git clone https://github.com/turtl/server "$final_path" --quiet
|
||||||
|
|
||||||
mkdir -p $final_path/plugins
|
mkdir -p $final_path/plugins
|
||||||
|
|
||||||
|
chmod 700 $final_path/plugins
|
||||||
|
chown $app:$app $final_path/plugins
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
chmod -R o-rwx "$final_path"
|
chmod -R o-rwx "$final_path"
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
|
@ -140,6 +143,7 @@ chown -R $app:www-data "$datadir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
|
ip_server="$(curl -s ip.yunohost.org)" || true
|
||||||
ynh_add_config --template="../conf/config.yaml.default" --destination="$final_path/config/config.yaml"
|
ynh_add_config --template="../conf/config.yaml.default" --destination="$final_path/config/config.yaml"
|
||||||
|
|
||||||
chmod 400 "$final_path/config/config.yaml"
|
chmod 400 "$final_path/config/config.yaml"
|
||||||
|
|
Loading…
Add table
Reference in a new issue