fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.38k stars 345 forks source link

Docker #1170

Open squatica opened 4 years ago

squatica commented 4 years ago

Hi, building on top of the PR #1162 updated the branches with current master and joined mine and @akash07k 's changes together into this PR. I suggest to squash all the commits together (maybe except deasync and '--dev'), because it's pretty confusing as it is. I left them separate for now just in case you prefer to look at all the single commits.

squatica commented 4 years ago

@jtojnar What do you think? Can it be merged? Or anything else necessary?

squatica commented 4 years ago

OK, I tested how it works with docker-compose files in utils/docker and it seems to be fine. It's not standard but works.

About Apache - I'd rather keep it, because there are a bunch of .htaccess files which will all stop working under php builtin server. Also php builtin server should not be used for production. What do you find complex about the Dockerfiles? They seem quite small to me, I've seen much worse :-D The production one is split into three parts using multi-staged build because we don't need npm nor composer for the production runtime environment. And the dev dockerfile basically only installs node and composer according to their official installation instructions. One minor simplification will become possible once the config.ini location is configurable or moved into data directory as suggested by #913 .

akash07k commented 4 years ago

Thanks a lot @squatica for this. It's working great so far. Actually I was out of station so couldn't pay attention to it till now. Thanks a tons for your efforts into this!

squatica commented 4 years ago

Hey @akash07k nice to hear from you again, I was worried what happened to you :smiley:

@jtojnar I created a docker hub account for selfoss, I'm going to configure automatic builds of the production image. Let me know how I can transfer the ownership to you.

akash07k commented 4 years ago

@squatica Yes buddy. actually I went on vacations for sometime and my laptop wasn't with me. I'm back now. how are you? and I'm very greatful for you for your efforts. I pinged you on gitter a month back but probably you were busy then.

Hey @akash07k nice to hear from you again, I was worried what happened to you 😃

@jtojnar I created a docker hub account for selfoss, I'm going to configure automatic builds of the production image. Let me know how I can transfer the ownership to you.

akash07k commented 4 years ago

Isn't it yet ready for merge?

jtojnar commented 4 years ago

The main blocker is that we do not have anyone knowledgable in Docker to properly review this.

akash07k commented 4 years ago

:(

On 3/29/20, Jan Tojnar notifications@github.com wrote:

The main blocker is that we do not have anyone knowledgable in Docker to properly review this.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/SSilence/selfoss/pull/1170#issuecomment-605505092

kolaente commented 4 years ago

Looks quite good, I have a few ideas:

  1. I would suggest creating the dev image on top of the production image - that way you get the benefit of having the same docker image for dev and prod (well, almost at least).
  2. Another approach would be to have a seperate "workspace" container which contains all the tools needed for development (composer etc) and has the same mounts as the prod image. Both would run side by side, but the prod image based container would only host the files - and be the same as any "real" prod deployment. This one would then also do things like running the frontend watcher on startup.
akash07k commented 4 years ago

Looks quite good, I have a few ideas:

  1. I would suggest creating the dev image on top of the production image - that way you get the benefit of having the same docker image for dev and prod (well, almost at least).
  2. Another approach would be to have a seperate "workspace" container which contains all the tools needed for development (composer etc) and has the same mounts as the prod image. Both would run side by side, but the prod image based container would only host the files - and be the same as any "real" prod deployment. This one would then also do things like running the frontend watcher on startup. Good ideas, I'm not that expert in Docker otherwise I would have tried working on these. @squatica opinions bro?
akash07k commented 4 years ago

It seems that now there are some package conflicts in package.lock.json due to the dependency updates. :-)

desaintmartin commented 3 years ago

Hello, An official container image would be really nice (and I may even build a Helm Chart for Kubernetes on top of this). Could we help in anything in order to have this merged and the image automatically built/published somewhere?

jtojnar commented 3 years ago

Sorry, I do not really use docker so it has been difficult for me to allocate time to it. I will try to do something with #1271 this week.

armandabric commented 3 years ago

If you need some help with it, I'm running https://github.com/armandabric/docker-selfoss since few year now. I hope it could help