DblK / tinshop

Tinshop is your own personal shop compatible with tinfoil
GNU Affero General Public License v3.0
42 stars 4 forks source link

stats.db cannot work with Docker #44

Open Helvio88 opened 1 year ago

Helvio88 commented 1 year ago

From my analysis, the stats.db file cannot exist in a Docker container persistently. Since the file is created in the app’s root folder, it can only be extracted from a running environment and mapped, making a consistent Docker deployment not perfect.

A suggestion would be to create a separate folder (like ./data) and store app files in this folder, which could be created automatically by code and then mapped as a Docker volume, containing config.yaml and stats.db.

Taking a step further, and optionally (perhaps even a separate future issue), all configurations could be set by environment vars. This is merely hypothetical discussion as of now.

DblK commented 1 year ago

The stats.db will be removed soon once I finished the pocketbase integration. The stats will be handled by pocketbase itself and this will ease the display on the ui.

Pocketbase handle all data within a directory and migrations too. I am not satisfied by the actual implementation so, once I moved on it will be cleaner (I hope).