Installation¶
This application is written in Python (API) and Javascript (client):
- API:
Flask
gpxpy to parse gpx files
staticmap to generate a static map image from gpx coordinates
python-forecast.io to fetch weather data from Dark Sky (former forecast.io)
Sports and weather icons are made by Freepik from www.flaticon.com.
Prerequisites¶
PostgreSQL database (10+)
Python 3.7+
API key from ThunderForest
API key from Dark Sky [not mandatory]
Installation¶
Warning
Since FitTrackee 0.2.1, Python packages installation needs Poetry. To install it on ArchLinux:
$ yaourt poetry
$ poetry --version
Poetry 0.12.17
# optional
$ poetry config settings.virtualenvs.in-project true
For other OS, see Poetry Documentation
Dev environment¶
Clone this repo:
$ git clone https://github.com/SamR1/FitTrackee.git
$ cd FitTrackee
Update Makefile.config file if needed and copy/paste the ThunderForest and Dark Sky API keys value in Makefile.custom.config file (see Environment variables).
Install Python virtualenv, React and all related packages and initialize the database:
$ make install-dev
$ make install-db
Start the server and the client:
$ make serve
Open http://localhost:3000 and login (the email is admin@example.com
and the password mpwoadmin
) or register
Prod environment¶
Warning
Note that FitTrackee is not production-ready yet
Download the last release (for now, it is the beta release v0.2.2):
$ wget https://github.com/SamR1/FitTrackee/archive/v0.2.2-beta.tar.gz
$ tar -xzf v0.2.2-beta.tar.gz
$ mv FitTrackee-0.2.2-beta FitTrackee
$ cd FitTrackee
Update Makefile.config file if needed and copy/paste the ThunderForest and Dark Sky API keys value in Makefile.custom.config file (see Environment variables).
Install Python virtualenv, React and all related packages and initialize the database:
$ make install
$ make install-db
Build the client:
$ make build-client
Start the server and the client:
$ make run
Open http://localhost:3000, log in as admin (the email is
admin@example.com
and the password mpwoadmin
) and change the
password
Upgrade¶
Warning
Dev environment¶
Stop the application and pull the repository:
$ git pull
Update Makefile.config and Makefile.custom.config file if needed
Upgrade packages and database:
$ make install-dev
$ make upgrade-db
Restart the server and the client:
$ make serve
Prod environment¶
TODO
Environment variables¶
The following environment variables must be defined in Makefile.custom.config:
variable |
description |
app default value |
---|---|---|
|
max. number of gpx file in zip archive |
10 |
|
max. size of a gpx or picture file |
1MB |
|
max. size of a zip archive |
10MB |
|
allows users to register |
true |
|
ThunderForest API key |
no defaut value, must be initialized |
|
DarkSky API key |
no defaut value, not mandatory |