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

Added the docker support #1162

Closed akash07k closed 4 years ago

akash07k commented 4 years ago

Added the docker support original credit goes to @squatica. https://github.com/squatica/selfoss-docker I updated it to work with the selfoss repo regardless of the local changes and also tweaked some things.

Dockerfile for Selfoss RSS aggregator is bundled with the repository.

Selfoss config is mounted in a separate volume, so your custom settings should survive reboot.

To run the latest stable tag (2.18) use:

docker-compose up

Then find the web interface at http://localhost:8390

To run the latest master version use:

docker-compose -f docker-compose-master.yml up

Then find the web interface at http://localhost:8391

To rebuild the master version with the latest code from git use:

docker-compose -f docker-compose.master.yml build --no-cache
jtojnar commented 4 years ago

I am not all that familiar with Docker, how do other web apps handle it? Especially the distinction between dev image and production image – there should be an explanation of what the Docker images are intended for and how should they be used.

Also I do not think it makes sense to duplicate Dockerfile for latest stable version in the repo. User could just git checkout <latest stable version> and use Dockerfile from there.

It would be cleaner to move the Docker-related files to somewhere like utils/docker, the root is already crowded as is.

Also I read somewhere in the past that multiple FROMs are bad. Is that not a case any more?

akash07k commented 4 years ago

I am not all that familiar with Docker, how do other web apps handle it? Especially the distinction between dev image and production image – there should be an explanation of what the Docker images are intended for and how should they be used.

-- I'll check regarding the explainations in the comments of the dockerfile.

Also I do not think it makes sense to duplicate Dockerfile for latest stable version in the repo. User could just git checkout <latest stable version> and use Dockerfile from there.

-- I'm also thinking to use only 1 dockerfile. will remove the Dockerfile responsible for checking out the stable version.

It would be cleaner to move the Docker-related files to somewhere like utils/docker, the root is already crowded as is.

I agree with the root croud issue, but moving the dockerfiles to the utils folder can be confusing for some people and will increase the complications. I don't think that we should do it. there will only be 3 extra files with the latest changes after the removal of the 1 dockerfile and corresponding docker-compose file. Those 3 will be: 'Dockerfile', 'docker-compose.yml' and '.dockerignore. I feel that having only 3 extra files for the sake of native docker compattibility is not a big deal.

Also I read somewhere in the past that multiple FROMs are bad. Is that not a case any more?

-- No, now docker has inbuilt support for multiple base images I.E: multiple froms.

akash07k commented 4 years ago

Fixes

1161

akash07k commented 4 years ago

I am not all that familiar with Docker, how do other web apps handle it? Especially the distinction between dev image and production image – there should be an explanation of what the Docker images are intended for and how should they be used.

Also I do not think it makes sense to duplicate Dockerfile for latest stable version in the repo. User could just git checkout <latest stable version> and use Dockerfile from there.

It would be cleaner to move the Docker-related files to somewhere like utils/docker, the root is already crowded as is.

Also I read somewhere in the past that multiple FROMs are bad. Is that not a case any more?

Please refer: https://docs.docker.com/develop/develop-images/multistage-build/ https://dev.to/brpaz/using-docker-multi-stage-builds-during-development-35bc

jtojnar commented 4 years ago

On a side note, could you please insert blank line between quotations and your replies? Unfortunately, GitHub will incorporate the reply into the blockquote if you don’t, making it very hard to read.

akash07k commented 4 years ago

On a side note, could you please insert blank line between quotations and your replies? Unfortunately, GitHub will incorporate the reply into the blockquote if you don’t, making it very hard to read.

Sure, I'll take care of that now.

akash07k commented 4 years ago

Ok. loging in :-)

On 12/27/19, squatica notifications@github.com wrote:

squatica commented on this pull request.

@@ -77,6 +77,25 @@ If you want to create a package with all the dependencies bundled, you can run `

Every patch is expected to adhere to our coding style, which is checked automatically by Travis. You can install the checkers locally using npm run install-dependencies, and then run the checks using npm run check before submitting a pull request. There is also npm run fix, that will attempt to fix the formatting.

+## Dockerizing selfoss + +Dockerfile for Selfoss RSS aggregator is bundled in the repository. + +Selfoss config is mounted in a separate volume, so your custom settings should survive reboot.

yes I'm here now: https://gitter.im/fossar/selfoss you will access it with your github account, just confirm the permissions

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

akash07k commented 4 years ago

Oh wow! seems interesting options. going to check them out too. Thanks a lot bro :-)

On 12/27/19, Jan Tojnar notifications@github.com wrote:

jtojnar commented on this pull request.

@@ -77,6 +77,25 @@ If you want to create a package with all the dependencies bundled, you can run `

Every patch is expected to adhere to our coding style, which is checked automatically by Travis. You can install the checkers locally using npm run install-dependencies, and then run the checks using npm run check before submitting a pull request. There is also npm run fix, that will attempt to fix the formatting.

+## Dockerizing selfoss + +Dockerfile for Selfoss RSS aggregator is bundled in the repository. + +Selfoss config is mounted in a separate volume, so your custom settings should survive reboot.

Alternately, you can use Matrix/Riot, or IRC to connect to the room, if you prefer.

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