Closed facundoolano closed 2 months ago
@julienma following up here on the PR you've sent. I still need to fill in instructions so it's more obvious how to quickly try the app locally with the default feeds.
I could use some context regarding how do you plan to run this, to make sure the config isn't over complicated and to document in the README (eg. will you run with authentication enabled? is it reasonable to manually issue commands to setup the secret key of the app?)
cc @raynix since you've sent a similar PR.
@facundoolano nice! Your instructions are pretty clear to me.
For context, I'm using docker compose files. Here's what I did:
ghcr.io/facundoolano/feedi:latest
, in default development
environment. It works.production.py
file with the SECRET_KEY
. It works fine. I'm wondering if it wouldn't be easier to set the secret as an env variable instead of fetching it from production.py
, though I understand that it would probably make it harder when deploying without docker. I'm not sure.Anyway, if you want to give an example docker compose file in your README, here's my minimal compose.yml
:
version: "3.8"
services:
feedi:
restart: unless-stopped
image: ghcr.io/facundoolano/feedi:latest
environment:
FLASK_ENV: production
ports:
- 9988:9988
volumes:
- ./instance:/app/instance
- ./config/production.py:/app/feedi/config/production.py
- I switched to production, and had to create a
production.py
file with theSECRET_KEY
. It works fine. I'm wondering if it wouldn't be easier to set the secret as an env variable instead of fetching it fromproduction.py
, though I understand that it would probably make it harder when deploying without docker. I'm not sure.
Yes, this setup is overly complicated, I've been thinking how to improve it. My original intention was to make sure you couldn't start in prod mode without explicitly setting a SECRET_KEY, that's why I made production.py a hard requirement. But I think what I'll do instead is to make production.py optional, and check explicitly for SECRET_KEY, after loading all configuration sources.