SamR1 / docker-fittrackee

GNU General Public License v3.0
13 stars 0 forks source link

Question: Does FT create some sort of local cache? #2

Closed sgofferj closed 3 years ago

sgofferj commented 3 years ago

Does FT create some kind of local cache? I did a make rebuild on the docker setup and the thumbnails are gone and I cannot access any workouts any more. The workout list is fine and I checked with pgadmin - the database seem fine too.

Screenshot_20210218_094626 Screenshot_20210218_094720 Screenshot_20210218_094648

SamR1 commented 3 years ago

Uploaded files and generated static maps are stored in upload directory (see environment variable UPLOAD_FOLDER), which is in fittrackee container. rebuild command recreates fittrackee container. I will look how to create and use external volume to avoid losing data (I'll move this issue in docker-fittrackee repo).

I'm not sure if this is a good practice, but make update upgrades FitTrackee to the latest version from PyPI (and make migrate updates database, if needed) without rebuilding container.

sgofferj commented 3 years ago

Persistant volumes would be the way to go for persistant data. If I understand it right, the docker philosophy says that a container should always be disposable and all data that need to be persistant should be on persistant volumes. Having the UPLOAD_FOLDER envvar should be fine. I probably should have read the whole docs before installing.

sgofferj commented 3 years ago

Here is my fix:

changed .env: export UPLOAD_FOLDER=/uploads

added to docker-compose.yml:

    volumes:
      - fittrackee_upload:/uploads:rw
SamR1 commented 3 years ago

Thanks, I updated docker-compse.yml and .env.example file.