Skip to content

Rote-Beete/juntagrico-docker

Repository files navigation

Juntagrico Docker Container

Juntagrico is a management platform for community gardens and vegetable cooperatives. It is developed in juntagrico/juntagrico.

Build status

Build Docker image

Getting Started

Prerequisities

In order to run this container you'll need docker installed.

Also, you need to have docker-compose available:

Usage

This repository contains a docker-compose configuration for starting a full deployment of juntagrico.

To start the services call:

docker-compose up --force-recreate --detach

Once everything has been started, you should be able to access juntagrico at http://localhost/.

When you are done using juntagrico, don't forget to shutdown the services using:

docker-compose down

Known Issues

On first start, there is a race condition where juntagrico will crash because Postgres is not yet ready when it attempts to run migrations.

To check if this is happening, you can view the logs of the instance using:

docker-compose logs juntagrico

If you see any errors relating to Postges connection issues, try restarting this container:

docker-compose restart juntagrico

Container Images

To help users to get up and running fast, the docker-compose setup uses an image that we publish to our registry at DockerHub by default.

GitHub Actions are used to build these images.

The latest image is built from the master branch.

Images tagged pr-XX will be built for pull requests.

If you want to build an image locally for usage with the provided docker-compose setup, use the following command:

docker build . -t rotebeete/juntagrico

Docker-compose will now use your locally generated image.

To return to the image from the registry use:

docker-compose pull

Environment Variables

Default values are shown in bold in brackets.

  • DJANGO_SUPERUSER_USERNAME (juntagrico) - Name of the administrative Django user
  • DJANGO_SUPERUSER_PASSWORD (juntagrico) - Password of the administrative Django user
  • DJANGO_SUPERUSER_EMAIL ([email protected]) - Email of the administrative Django user
  • GUNICORN_PORT (8000) - Port the gunicorn webserver will listen on
  • JUNTAGRICO_ALLOWED_HOSTS - Comma separated list of hosts which should be set as Django's ALLOWD_HOSTS list
  • JUNTAGRICO_DATABASE_BACKEND (django.db.backends.sqlite3) - Django database backend configuration. See documentation for different configuration possibilities
  • JUNTAGRICO_DATABASE_NAME (juntagrico.sqlite3) - Name of the database
  • JUNTAGRICO_DATABASE_USER - Database username (Not used for SQLite3)
  • JUNTAGRICO_DATABASE_PASS - Database password (Not used for SQLite3)
  • JUNTAGRICO_DATABASE_HOST - Database Host (Not used for SQLite3)
  • JUNTAGRICO_DATABASE_PORT - Database Port (Not used for SQLite3)
  • JUNTAGRICO_EMAIL_BACKEND - Django mail backend to use
  • JUNTAGRICO_EMAIL_HOST (localhost) - SMTP host to use for mail sending
  • JUNTAGRICO_EMAIL_USER ([email protected]) - SMTP username
  • JUNTAGRICO_EMAIL_PASS (secret) - SMTP password
  • JUNTAGRICO_EMAIL_PORT (587) - SMTP port
  • JUNTAGRICO_EMAIL_TLS (true) - Should be true for privacy reasons
  • JUNTAGRICO_SECRET_KEY - A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value.

Volumes

  • /home/app/web/static - Static web files (Images, CSS, JS, ... )

Built With

  • Juntagrico 1.3.7
  • gunicorn 20.0.4
  • psycopg2 2.8.6

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Michael Gerlach - Initial work - n3ph

See also the list of contributors who participated in this project.

License

This project is licensed under the AGPL License - see the LICENSE.md file for details.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •