-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to dockerize Selfoss #1161
Comments
That will depend on what you want to use the Docker image for. If you want to use if for running selfoss on production, you do not need node, you can use one of the prebuilt archives in https://github.com/SSilence/selfoss#download and copy one of the existing Dockerfiles from Docker Hub:
If you want to use it for development, I do not think docker-compose is necessary for node. The JavaScript assets are served by the web server so I would expect them to reside in the same image. You could install Node in the Dockerfile just like PHP and other stuff is. If you want to use database other than SQLite, then docker-compose might be useful to orchestrate the communication between the PHP server and the DB server but it is not necessary either. Or if you want to use PHP-FPM. |
I'm actually currently preparing a Dockerfile for selfoss with the intention to send a PR. As @jtojnar said there are two main scenarios - you either want the "production" image which contains app sources inside, or a "dev" image which only contains dev dependencies and tools, but sources are mounted to your filesystem.
You can build and use it directly, but here is a simple docker-compose.yml just to mount the volume with data and port. (You may need to re-run the chown command after your data volume is mounted for the first time, that's still one of my TODO items)
|
Waiting for your dev dockerfile eagerly because I'm more willing to use it for development because the production version is quite outdated now. |
No luck with both the files. In second dockerfile, I always get (localhost sent an empty response.). |
@squatica |
@akash07k All right, I cleaned it up here: https://github.com/squatica/selfoss-docker |
@squatica |
@squatica |
Based on the link (https://hub.docker.com/r/pamplemousse/selfoss/dockerfile) above I managed to get it packaged into a docker-compose including a MySql database and also including my Webfront. Have a look here: https://github.com/MatthK/swfd |
For the newly released selfoss 2.19, we are recommending https://gitlab.com/radek-sprta/docker-selfoss. It uses a proper service manager, which was something I was missing from the other approaches. We might still have an official image in the future but I currently do not have the capacity to push it to meet the project requirements. I would still like to thank everyone who worked on this. |
I want to dockerize selfoss, but I'm unable to identify that how exactly I do it since it uses PHP and nodejs both.
If I require to use docker-compose, then can someone please help me with the exact proper script?
The text was updated successfully, but these errors were encountered: