standardnotes / self-hosted

[Legacy] Self-host your own Standard Notes server for end-to-end encrypted notes and files
https://github.com/standardnotes/server
GNU Affero General Public License v3.0
342 stars 38 forks source link

Why not combine everything in one image? #39

Open BobWs opened 3 years ago

BobWs commented 3 years ago

Any chance that you guys could combine these images into one single image?

standardnotes/syncing-server-js
standardnotes/api-gateway
standardnotes/auth

What is the benefit of having all the separate containers? To me it would make more sense to have everything combined into one single container and keep the database and Redis external. There are more benefits to have one single container than all those separately.

Updating containers this way is very tedious and the chance of errors is also much higher considering the fact that you can't even use the latest:tag. Now you have to change the docker-compose file every time with the correct version and then just hope that it goes well when updating.

eric-pierce commented 3 years ago

@BobWs the intended setup is to use the scripts in the standalone repository rather than manage through docker tags. To enable support for alternative I opened an enhancement request to maintain a "current compatible" tag of compatible containers, which we'll see if the SN team decides to move forward with.

On your question around why the containers are broken out separately, the reason is production scalability - the developers provided more of a POV here: https://github.com/standardnotes/standalone/issues/20#issuecomment-887563859

BobWs commented 3 years ago

@BobWs the intended setup is to use the scripts in the standalone repository rather than manage through docker tags. To enable support for alternative I opened an enhancement request to maintain a "current compatible" tag of compatible containers, which we'll see if the SN team decides to move forward with.

On your question around why the containers are broken out separately, the reason is production scalability - the developers provided more of a POV here: #20 (comment)

Thanks for replying, unfortunately the script you mentioned doesn’t work for everyone, in my case (and I’m sure for some others) it isn’t working on a Synology NAS. So we have to use docker-compose and the docker tags. That is why I have asked the question. If there would be an good alternative for the script method than that would be great...

karolsojko commented 3 years ago

@BobWs why does the script not work for you? It's basically an abstraction over docker-compose

hwittenborn commented 2 years ago

This is somewhat related, but I really would prefer if there was a simple Docker Compose config that didn't require me to run a random script on my server.

I get that I can validate the script manually, and I'm also familiar enough with shell scripting, but it only adds extra overhead to what I need to keep track of.

I would prefer an approach that just bundles everything up in one image (possibly minus the database server). I'm assuming the script that updates environment variables is to allow for breaking changes between releases, but at that point I would just prefer versioned tags for the Docker images, and then a changelog to just be posted somewhere that lists the necessary changes to upgrade between versions.

I really can't see myself using Standard Notes until a simpler approach is introduced for selfhosting.

Ryonez commented 2 years ago

I really can't see myself using Standard Notes until a simpler approach is introduced for selfhosting.

Frankly I've been forced to leave. I was using standard notes, but then they split everything into so many pieces. Scripts aren't suitable, I'm running unRaid. Hell, compose isn't even officially supported in it currently. Attempting to set things up manually, using the compose file as a reference failed to work (and is something I've had to do several times, so I'm fairly confidant in my ability to do that). So in the end, had to export and move on.

BobWs commented 2 years ago

, but then they split everything into so many pieces.

I agree at the moment I have 11 containers running for just one app. It is really disappointed how the development goes of this great program. I really love the idea how standardnotes works as a note app, it has everything I was looking for in an notes app, but the way of selfhosting this program is really a time consuming effort.

I stopped updating the containers because it is to time consuming...still looking for an alternative. Joplin looks promising but lakes some of the standardnotes features.

Ryonez commented 2 years ago

Joplin looks promising but lakes some of the standardnotes features.

I've tried that for a bit, but unfortunately got hit with bit of data lose during it's use. I've been unable to tell why, and have become somewhat warry of it. Currently I'm trying out Obsidian, and syncing files through syncthing.

mwmason commented 2 years ago

I combined everything into one container and I used s6-overlay to init all the individual processes (auth, api-gateway, syncing-server and redis) - it's been running fine since I ported from the ruby version in August.

BobWs commented 2 years ago

I combined everything into one container

would you like to share your container, by making it public to other users who are struggling...?

mwmason commented 2 years ago

Sure - give me a few to structure something that will make sense. I used Dockerfile and as I mentioned - s6-overlay which basically lets you init subprocesses within a container - the repository is here .

mwmason commented 2 years ago

Ok, I created a public repository here - my first public repository - please verify you have access. You can create questions there as my readme is just a first draft!