Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:fittrackee [2024/06/20 10:12] – willy | services:fittrackee [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | ||
- | |||
- | [[https:// | ||
- | |||
- | ===== Installation ===== | ||
- | |||
- | Detailed instructions can be found [[https:// | ||
- | |||
- | <code bash> | ||
- | useradd -d / | ||
- | </ | ||
- | |||
- | FitTrackee uses Python, so check out [[gentoo: | ||
- | |||
- | python -m venv venv_ft | ||
- | source venv_ft/ | ||
- | pip install fittrackee | ||
- | |||
- | Now, FitTrackee requires PostgreSQL, so you need to install and start it. For reference, and [[https:// | ||
- | |||
- | From now on i assume PostgreSQL is installed and ready. | ||
- | |||
- | Now access your postgres as admin user and create the database: | ||
- | <code bash> | ||
- | psql -U postgres | ||
- | </ | ||
- | |||
- | type in the following SQL statements: | ||
- | <code sql> | ||
- | CREATE USER fittrackee WITH PASSWORD '< | ||
- | CREATE SCHEMA fittrackee AUTHORIZATION fittrackee; | ||
- | CREATE DATABASE fittrackee OWNER fittrackee; | ||
- | </ | ||
- | |||
- | <file - .env> | ||
- | export PORT=5123 | ||
- | export APP_SECRET_KEY=< | ||
- | export APP_LOG=/ | ||
- | export UPLOAD_FOLDER=/ | ||
- | export DATABASE_URL=postgresql:// | ||
- | export UI_URL=https:// | ||
- | export EMAIL_URL=smtp:// | ||
- | export SENDER_EMAIL=xxx@mydomain.com | ||
- | export FLASK_APP=fittrackee | ||
- | </ | ||
- | |||
- | Ensure this **.env** file is sourced in your **~/ | ||
- | |||
- | As a reference: | ||
- | <file - .bashrc> | ||
- | (only last lines shown) | ||
- | export PATH=$PATH: | ||
- | source venv_ft/ | ||
- | source .env | ||
- | </ | ||
- | |||
- | Now, initialize the database: | ||
- | ftcli db upgrade | ||
- | |||
- | To start FitTrackee see the autostart script below. | ||
- | |||
- | |||
- | ===== Reverse Proxy ===== | ||
- | |||
- | I have deployed FitTrackee on a subdomain, because i already had one set up for it. Check [[selfhost: | ||
- | |||
- | <file - fittrackee.conf> | ||
- | server { | ||
- | server_name train.gardiol.org; | ||
- | listen 443 ssl; | ||
- | listen 8443 ssl; | ||
- | |||
- | access_log / | ||
- | error_log / | ||
- | |||
- | location / { | ||
- | proxy_pass http:// | ||
- | proxy_redirect | ||
- | proxy_set_header | ||
- | proxy_set_header | ||
- | proxy_set_header | ||
- | proxy_set_header | ||
- | proxy_set_header | ||
- | } | ||
- | |||
- | client_max_body_size 100M; | ||
- | include org.gardiol/ | ||
- | } | ||
- | </ | ||
- | |||
- | ===== Autostart ===== | ||
- | |||
- | If you follow my [[gentoo: | ||
- | |||
- | Create the script **/ | ||
- | <file - fittrackee_start.sh> | ||
- | #!/bin/bash | ||
- | cd ~ | ||
- | export PATH=$PATH: | ||
- | source venv_ft/ | ||
- | source .env7 | ||
- | # Workers are not really needed on very small instances. Uncomment if you need them | ||
- | # flask worker --processes 2& | ||
- | fittrackee | ||
- | </ | ||
- | and make it executable. | ||
- | |||
- | Then add the links (as root): | ||
- | <code bash> | ||
- | ln -s _servicer.sh 65-fittrackee--script.start | ||
- | server / | ||
- | </ | ||
- | |||
- | and run the start link now to start it. | ||
- | |||
- | ===== User management ===== | ||
- | |||
- | If you do not require generating and managing many users, you can manually create them: | ||
- | <code bash> | ||
- | ftcli users create --password < | ||
- | ftcli users update myuser --set-admin true | ||
- | </ | ||
- | |||
- | and then disable user registration from the admin panel in theweb GUI, set the number of active users to a fixed quantity instead of zero. | ||
- | ===== TODO ===== | ||
- | |||
- | fix log path | ||
- | |||
- | fix email sending | ||
- | |||
- | ===== Garmin Integration ===== | ||
- | |||
- | https:// | ||
- | |||
- | pip install --upgrade --index-url https:// | ||
- | |||
- | |||