This repository contains a Dockerfile and docker-compose.yml for quick deployment of Froide using Docker. The Dockerfile is based on Debian 10 (Buster) and provides all necessary dependencies to host a Froide instance, which are installed both from Debian repository and PyPI.
The purpose of this repository is to provide a quick way to kickstart an example Froide stack. We have not found any official deployment script for Docker, so if you were also looking for it - here you go :)
Please note that this is not a production-ready deployment script, though.
At first, clone this repository with its submodules. The original Froide repository will be cloned to the froide directory.
git clone [email protected]:Reprostar/froide-docker.git --recurse-submodules
In case you have already cloned this repo without --recurse-submodules parameter, enter the project directory and run:
git submodule init
git submodule update
Next, customize local_settings.py to your needs (that's a copy of froide/froide/local_settings.py.example). For instructions on how to configure Froide, please refer to the official documentation and look at the base configuration file located at froide/froide/settings.py. As the most important part, you will probably need to perform a database migration, create a superuser and configure reverse proxy such as Nginx. Also, remember to set a valid entry in ALLOWED_HOSTS in the local_settings.py.
When configuring credentials to the PostgreSQL and Elasticsearch services, use the defaults defined in the docker-compose.yml. Reminder that those services are not accessible by Froide on localhost, but on db and elasticsearch hostnames.
If you're using docker-compose to deploy the app with sample PostGIS and Elasticsearch services, you can use docker-compose.yml included in this repository. To modify its contents, you can create a docker-compose.override.yml file and alter settings from the original.
If everything is ready to go, you can kickstart Froide by:
docker-compose up -d
And you can access console (i.e. to use manage.py utility) by:
docker-compose exec app bash
To compile frontend assets using webpack, you can do it within the container, using:
# Assuming that you have already entered console by `docker-compose exec app bash`
apt install nodejs npm
npm install
npm run build
Author of this repository does not give any warranty for using those scripts. You are using them on your own responsibility. If you have any problems with Froide or you want to get support for the platform itself, please create an issue at https://github.com/okfde/froide/issues.
Both Froide and froide-docker are licensed under the MIT License.