This project contains all files necessary for setting up a Pybossa instance.
- Run
cp .env.tmpl .env
and change the contents of.env
to your needs. Especially set an postgres password. - Install docker and docker-compose, if not already installed: https://docs.docker.com/engine/install/ and https://docs.docker.com/compose/install/. For Ubuntu:
curl -fsSL htstps://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker your-user
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- [If local development]: Copy over the production database to your local machine:
- Log onto the production machine
- Run
docker exec [postgres docker container name] pg_dump -U pybossa -F t pybossa | gzip >~/backup/pybossa-$(date +%Y-%m-%d).tar.gz
- Copy the resuling .tar.gz file to your local machine
- Start the local database with
docker-compose up -d postgres
- Restore the database with
docker exec -i [postgres docker container name] pg_restore -U pybossa -d pybossa < [.tar.gz file path]
- Build and run the composition with
docker-compose up -d
- [If local development]: Modify the compose file: Comment out unneeded party from the compose file: nginx-proxy, nginx-proxy-letsencrypt and, if you copied over the production database, db-init.
- Build and run the composition with
docker-compose up -d
- Point your web browser to the machines address. The first registered user will be made admin.
In this case an error with the nginx proxy might be the source of trouble. For solving it a force-recreate has to be triggered. Docker has not recognized any changes in one of the containers. Hence a recreation of the container and its volume has to be triggered manually by the following command.
docker-compose up -d --build --force-recreate
Is triggered when the code includes syntax errors. Check the docker-compose logs for the traceback. When there are no issues check if the pybossa background worker is running. Otherwise it could be the case that this container was started to early. It has to be started after the pybossa container is already running. In this case stop docker-compose and start it again.