Run WriteFreely with Docker

Hi,
In Writefreely repository there are docker-compose.prod.yml and Dockerfile.prod files.
These files are not sufficient to run an instance in production. I mean, it is not enough to run a docker-compose up -d.
I would like to help with this issue, but I am not clear on what state it is in. I have managed to run an instance on localhost by changing things, but I assume someone must be taking care of it and I don’t want to step on that person’s work.
Where can I look for more information on this?

Here’s the latest progress made on that:

In addition to any changes you need to make there, I think we need documentation to help people run in production. Currently no one is working on this, so please feel free to open issues / PRs as needed!

Hi,

There are several options to continue with the work that has been done:
On one hand, I can generate the corresponding documentation to ensure
everything in the repository works as expected.
On the other hand, you could upload the image to a repository such as
Docker Hub and modify the docker-compose file. This would streamline the
upgrade process, as it would only require running docker-compose down,
docker-compose pull, and docker-compose up -d.
Another option (if you don’t want to build an official image) is to
create a bash script that builds the image and handles everything needed
for installation or upgrades.
One more thing to consider: it’s possible to add Nginx to the
docker-compose setup. This would further automate the installation, but
some users might prefer to use their own pre-installed server. In that
case, Nginx could be commented out in the docker-compose file.

Do you have any suggestions or preferences on which of these approaches
would be the best to pursue?

Best regards.

I have reviewed the GitHub repository and documentation.
If this approach seems correct to you, I will proceed with the following steps:

  1. Update the docker-publish.yml workflow to generate production Docker images when a new tag is created and development images (as it currently does) with each push.
  2. Update docker-compose.prod to work with the production image.
  3. Create an optional docker-compose configuration that includes a web server, in case one is not installed on the system.
  4. Create a bash script that handles downloading and running the necessary components to simplify installation for the user.
  5. Update the documentation.
    Should I open an issue explaining this and then proceed with a PR?
    Best regards.

Thanks for taking a look at this! After a quick read-through, it looks great.

As for the documentation, since we’ve already discussed here, please feel free to just open a PR with the updated docs, linking any existing issues we might close along with it (like #2?).

I have opened this PR. Docker setup improvement: Run WriteFreely with Docker in production by jpavonabian · Pull Request #1136 · writefreely/writefreely · GitHub
If it merge I will proceed with the documentation.

1 Like