Closed mspittler closed 2 years ago
Thank you, I only used HedgeDoc for writing personal stuff and guides without images, so I missed that point.
By checking that out I noticed uploading images needs some additional config, otherwise the editor will just display something like "uploading image..."
So ~/etc/services.d/hedgedoc.ini
also needs the following settings
CMD_DOMAIN="isabell.uber.space",
CMD_PROTOCOL_USESSL="true",
... If the HedgeDoc config is set to
"imageUploadType": "filesystem"
all users images are stored in this place.
This is the default setting
I'm actually not a big fan of copying persistent files all the time into the app file tree.
uploadsPath -> ./public/uploads
- e.g. /home/isabell/hedgedoc_uploads (It looks like there is currently no environment variable for this setting) - So the update script doesn't care.What do you think?
I don't see a perfect solution, but some ideas.
But first, regarding the ~/etc/services.d/hedgedoc.ini
: Since domain
is by default defined in the config.json
-example, I'd rather add there protocolUseSSL = true
under production
in the installation guide.
I'm actually not a big fan of copying persistent files all the time into the app file tree.
I agree. I think for the moment, a message in the guide and when running the script is sufficient. For example in do_upgrade()
:
echo "If everything works fine you can delete ~/hedgedoc_$LOCAL. Please consider that there might me uploaded files in ~/hedgedoc_$LOCAL/public/uploads which were not migrated to the new version."
Users who made it this far, will be reminded and handle the problem to their taste. For a more permanent solution I'd wait for HedgeDoc 2.0, since this is the great rewrite and might introduce anyway breaking chances.
Last question: Since you have removed ~/hedgedoc/.sequelizerc
from the guide, is it not necessary anymore?
Best wishes!
I don't see a perfect solution, but some ideas.
But first, regarding the
~/etc/services.d/hedgedoc.ini
: Sincedomain
is by default defined in theconfig.json
-example, I'd rather add thereprotocolUseSSL = true
underproduction
in the installation guide.
Yes, we can also do it that way.
In my initial guide re-release I removed the config.json completely to avoid double or conflicting configuration settings. At that time the ´.sequlizerc` file was used by the app where you also had to set the database credentials. Since the release of 1.8 it is not used any more. The HedgeDoc team advertised something like "The Release of 2.0 will be early 2021" and its config system will be based on environment variables and .env files. - So I used to set all settings with environment variables in preparation for the new app.
I agree. I think for the moment, a message in the guide and when running the script is sufficient. For example in
do_upgrade()
:echo "If everything works fine you can delete ~/hedgedoc_$LOCAL. Please consider that there might me uploaded files in ~/hedgedoc_$LOCAL/public/uploads which were not migrated to the new version."
Users who made it this far, will be reminded and handle the problem to their taste. For a more permanent solution I'd wait for HedgeDoc 2.0, since this is the great rewrite and might introduce anyway breaking chances.
We can do that too.
Last question: Since you have removed
~/hedgedoc/.sequelizerc
from the guide, is it not necessary anymore?
Since 1.8 it is not necessary and you can safely delete it.
The update guide and the script should both mention and respect the files which are stored in
~/hedgedoc/public/uploads
. If the HedgeDoc config is set to"imageUploadType": "filesystem"
all users images are stored in this place.Thanks @EV21 for writing the script in the first place!