self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

Why not combine everything in one image?

Open BobWs opened this issue 3 years ago • 11 comments

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.

BobWs avatar Aug 11 '21 13:08 BobWs

@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

eric-pierce avatar Aug 11 '21 13:08 eric-pierce

@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...

BobWs avatar Aug 12 '21 14:08 BobWs

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

karolsojko avatar Aug 24 '21 14:08 karolsojko

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.

hwittenborn avatar Nov 09 '21 01:11 hwittenborn

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.

Ryonez avatar Dec 30 '21 13:12 Ryonez

, 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.

BobWs avatar Jan 03 '22 12:01 BobWs

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.

Ryonez avatar Jan 03 '22 14:01 Ryonez

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.

mwmason avatar Jan 03 '22 17:01 mwmason

I combined everything into one container

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

BobWs avatar Jan 04 '22 08:01 BobWs

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 avatar Jan 04 '22 14:01 mwmason

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!

mwmason avatar Jan 04 '22 18:01 mwmason