mirror of
https://github.com/YunoHost-Apps/fittrackee_ynh.git
synced 2024-09-03 18:36:16 +02:00
commit
e68ac219f9
13 changed files with 55 additions and 31 deletions
|
@ -20,7 +20,7 @@ FitTrackee allows you to track your outdoor activities (workouts) from gpx files
|
|||
No mobile app has been developed yet, but several existing mobile apps can store workouts data locally and export them into a gpx file.
|
||||
|
||||
|
||||
**Shipped version:** 0.7.13~ynh1
|
||||
**Shipped version:** 0.7.14~ynh1
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
|||
|
||||
Traqueur d’activités extérieures auto-hébergé 🚴
|
||||
|
||||
**Version incluse :** 0.7.13~ynh1
|
||||
**Version incluse :** 0.7.14~ynh1
|
||||
|
||||
## Captures d’écran
|
||||
|
||||
|
|
|
@ -23,18 +23,16 @@ REDIS_URL=redis://
|
|||
# API_RATE_LIMITS="300 per 5 minutes"
|
||||
|
||||
# Emails
|
||||
UI_URL=__DOMAIN__
|
||||
# UI_URL=__DOMAIN__
|
||||
# EMAIL_URL=
|
||||
# SENDER_EMAIL=
|
||||
# WORKERS_PROCESSES=
|
||||
|
||||
# Workouts
|
||||
## Change default maps as per https://github.com/SamR1/FitTrackee/issues/313
|
||||
TILE_SERVER_URL=https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png
|
||||
# STATICMAP_SUBDOMAINS=
|
||||
MAP_ATTRIBUTION='fond de carte par <a href="http://www.openstreetmap.fr/mentions-legales/" target="_blank" rel="nofollow noopener">OpenStreetMap France</a>, sous <a href="http://creativecommons.org/licenses/by-sa/2.0/fr/" target="_blank" rel="nofollow noopener">licence CC BY-SA</a>'
|
||||
# DEFAULT_STATICMAP=False
|
||||
STATICMAP_SUBDOMAINS=a,b,c
|
||||
TILE_SERVER_URL=https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
|
||||
MAP_ATTRIBUTION='© <a href="http://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer">OpenStreetMap</a> contributors'
|
||||
DEFAULT_STATICMAP=False
|
||||
STATICMAP_SUBDOMAINS=''
|
||||
|
||||
# Weather
|
||||
# available weather API providers: darksky, visualcrossing
|
||||
|
|
|
@ -29,8 +29,26 @@ Environment="STATICMAP_SUBDOMAINS="
|
|||
Environment="MAP_ATTRIBUTION="
|
||||
Environment="WEATHER_API_KEY="
|
||||
WorkingDirectory=__INSTALL_DIR__/
|
||||
ExecStart=__INSTALL_DIR__/.venv/bin/gunicorn -b 127.0.0.1:__PORT__ "fittrackee:create_app()" --error-logfile /var/log/__APP__/__APP__.log
|
||||
ExecStart=__INSTALL_DIR__/.venv/bin/gunicorn -b 127.0.0.1:__PORT__ "fittrackee:create_app()" --error-logfile /var/log/__APP__/gunicorn.log
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Denying access to capabilities that should not be relevant for webapps
|
||||
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
|
||||
CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD
|
||||
CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE
|
||||
CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT
|
||||
CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK
|
||||
CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
|
||||
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
|
||||
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
|
||||
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
|
||||
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -12,7 +12,7 @@ Restart=always
|
|||
RestartSec=1
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||
StandardOutput=append:/var/log/__APP__/__APP___workers.log
|
||||
StandardError=inherit
|
||||
SyslogIdentifier=__APP___workers
|
||||
EnvironmentFile=__INSTALL_DIR__/.env
|
||||
|
@ -29,6 +29,9 @@ WorkingDirectory=__INSTALL_DIR__/
|
|||
ExecStart=__INSTALL_DIR__/.venv/bin/flask worker --processes 2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "FitTrackee"
|
|||
description.en = "Self-hosted outdoor activity tracker 🚴"
|
||||
description.fr = "Traqueur d’activités extérieures auto-hébergé 🚴"
|
||||
|
||||
version = "0.7.13~ynh1"
|
||||
version = "0.7.14~ynh1"
|
||||
|
||||
maintainers = ["Thovi98"]
|
||||
|
||||
|
@ -20,8 +20,8 @@ code = "https://github.com/SamR1/FitTrackee"
|
|||
yunohost = ">= 11.1.13"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = "false"
|
||||
sso = "false"
|
||||
ldap = false
|
||||
sso = false
|
||||
disk = "50M"
|
||||
ram.build = "50M"
|
||||
ram.runtime = "50M"
|
||||
|
@ -30,7 +30,6 @@ ram.runtime = "50M"
|
|||
[install.domain]
|
||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
||||
type = "domain"
|
||||
full_domain = true
|
||||
|
||||
[install.init_main_permission]
|
||||
type = "group"
|
||||
|
@ -47,12 +46,14 @@ ram.runtime = "50M"
|
|||
help.fr = "Comme Darksky déprécie son API, il est suggéré d'opter pour Visual Crossing"
|
||||
type = "select"
|
||||
choices = ["", "darksky", "visualcrossing"]
|
||||
default = "visualcrossing"
|
||||
optional = true
|
||||
|
||||
[install.weather_key]
|
||||
ask.en = "(Optional) Insert here the api key from the chosen weather provider"
|
||||
ask.fr = "(Optionnel) Insérez ici la clé API du fournisseur de météo choisi"
|
||||
type = "string"
|
||||
default = false
|
||||
optional = true
|
||||
|
||||
[resources]
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
fittrackee_version="0.7.13"
|
||||
fittrackee_version="0.7.14"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -18,6 +18,8 @@ ynh_script_progression --message="Configuring logrotate to manage application lo
|
|||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate --specific_user=$app
|
||||
touch /var/log/$app/$app.log
|
||||
touch /var/log/$app/${app}_workers.log
|
||||
touch /var/log/$app/gunicorn.log
|
||||
chown -R $app:www-data /var/log/$app/
|
||||
|
||||
|
||||
|
@ -91,7 +93,7 @@ ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers
|
|||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log"
|
||||
yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/$app.log"
|
||||
yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/${app}_workers.log"
|
||||
|
||||
|
||||
#=================================================
|
||||
|
@ -107,7 +109,7 @@ ynh_script_progression --message="Starting the systemd services..." --weight=15
|
|||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/${app}_workers.log" --line_match="Started"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -22,6 +22,8 @@ ynh_script_progression --message="Configuring logrotate to manage application lo
|
|||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate --specific_user=$app
|
||||
touch /var/log/$app/$app.log
|
||||
touch /var/log/$app/${app}_workers.log
|
||||
touch /var/log/$app/gunicorn.log
|
||||
chown -R $app:www-data /var/log/$app/
|
||||
|
||||
#=================================================
|
||||
|
@ -65,8 +67,8 @@ systemctl enable "${app}_workers.service" --quiet
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add "${app}"
|
||||
yunohost service add "${app}_workers"
|
||||
yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log"
|
||||
yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/${app}_workers.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
@ -74,7 +76,7 @@ yunohost service add "${app}_workers"
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/${app}_workers.log" --line_match="Started"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -29,7 +29,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --action="stop" --service_name="${app}" --log_path="/var/log/$app/$app.log" --line_match="Stopped"
|
||||
ynh_systemd_action --action="stop" --service_name="${app}_workers" --log_path="systemd" --line_match="Stopped"
|
||||
ynh_systemd_action --action="stop" --service_name="${app}_workers" --log_path="/var/log/$app/${app}_workers.log" --line_match="Stopped"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -89,8 +89,8 @@ ynh_add_systemd_config --service="${app}_workers" --template="fittrackee_workers
|
|||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add "${app}"
|
||||
yunohost service add "${app}_workers"
|
||||
yunohost service add "${app}" --description="Fittrackee main service" --log="/var/log/$app/$app.log"
|
||||
yunohost service add "${app}_workers" --description="Fittrackee task queue service" --log="var/log/$app/${app}_workers.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
@ -99,7 +99,7 @@ ynh_script_progression --message="Starting the systemd services..." --weight=15
|
|||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name="${app}" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Booting worker with pid"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Started"
|
||||
ynh_systemd_action --service_name="${app}_workers" --action="start" --log_path="/var/log/$app/${app}_workers.log" --line_match="Started"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Reference in a new issue