mastodon_ynh icon indicating copy to clipboard operation
mastodon_ynh copied to clipboard

Upgrading wipe the edits on .env.production

Open clawfire opened this issue 1 year ago • 5 comments

Describe the bug

After performing an update from YNH web panel, the .env.production file is back to the version installed by the app, without the S3 credentials I entered. Which cause the app to not being able to access the previously stored objects and having dead link all over the app.

Context

  • YunoHost version: 11.2.3
  • I have access to my server: Through SSH & through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • If upgrading, current package version: 4.1.4~ynh1

Steps to reproduce

  • Prior to an update, edit the .env.production file
  • Perform update
  • Re-open the .env.production file

Expected behavior

File still contains edits

clawfire avatar Jul 22 '23 22:07 clawfire

Hi. This is a know issue/missing feature for this package (duplicate #385). We are trying to create config_panel.toml that will address this issue. Could you precise which keys you would want to persist in the .env.production ? Are you proxying object storage through nginx ? (https://docs.joinmastodon.org/admin/optional/object-storage-proxy/)

Tagadda avatar Jul 23 '23 04:07 Tagadda

Essentially I would need:

  • S3_ENABLED (=true)
  • S3_BUCKET
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • S3_REGION

I'm not using the other S3 settings, defaults values works just fine.

Not using proxying object storage since I'm the only one on my instance, so I don't experience any "rush" of access when a new post is made. That would mitigate temporary disruption of S3 connexion though. I'll consider it as an additional step to put in place, thanks for sharing.

clawfire avatar Jul 23 '23 10:07 clawfire

Sorry for hijacking this issue, but some other settings could/should also be made available (I was planning on trying this myself but lack of documentation of configpanel meant it went nowhere):

LDAP_ENABLED (=false for public instances)

DEEPL_API_KEY=(INSERT API KEY) DEEPL_PLAN (=free)

For allowing machine translation.

Thanks!

panomaki avatar Jul 23 '23 14:07 panomaki

OH YEAH, the DEEPL_API_KEY and DEEPL_PLAN too ❤

clawfire avatar Jul 24 '23 18:07 clawfire

Hi, I might be late to the party, but I wanted to add another set of settings: Since Mastodon has full text search it would be nice to store the elasticsearch values too:

ES_ENABLED=true
ES_HOST=localhost
ES_PORT=9200
ES_PRESET=

sdfoersn490 avatar Dec 06 '23 16:12 sdfoersn490