Sign inSign up

wischlabs/locality_finder

By wischlabs

•Updated almost 7 years ago

This projects builds docker images for hosting a django application inside a kubernetes environment

Image
0

1.8K

wischlabs/locality_finder repository overview

⁠Locality Finder⁠

Build Status

The locality finder is a Django Web-Application, which let's you find local events in your neighboorhood.

⁠Installation

⁠Docker-Compose

If you have docker and docker-compose installed in your system, than this is the easiest way of hosting the application:

docker-compose up -d
docker-compose exec web python manage.py migrate
docker-compose exec web python manage.py collectstatic --no-input

Afterwards you can browse to http://127.0.0.1:8080/⁠ and see your brand new locality finder instance.

⁠Kubernetes

We also deliver a Helm chart to deploy this application into a Kubernetes Cluster. Simply copy the helm_chart/prod_values.example.yaml to helm_chart/prod_values.yaml and fill it out with your production values.

Afterwards you can start your new Helm release like so:

helm install -f helm_chart/prod_values.yaml --namespace <a_new_namespace> helm_chart

There are a few requirements though:

  1. You need to already have setup Helm / Tiller into your Kubernetes cluster.
  2. This also includes a ServiceAccount and ClusterRoleBinding with appropriate rights.
  3. You need a working Issuer or ClusterIssuer to obtain a valid let's-encrypt certificate. It does not matter, which Ingress-Controller you are installing into your Cluster as long as it promotes a working Issuer. Here are some examples for issuers:
⁠Locally

This option is not recommended, because you need to have a running PostGIS installation on your server. If you still want to run it locally, install all requirements into your system or a python virtual environment and point your django settings to settings/base_settings. You still need to adapt your database settings in there.

Your workflow might look like this:

virtualenv venv
source venv/bin/activate

pip install -r requirements.txt
pip install -r docker_requirements.txt

DJANGO_SETTINGS_MODULE=settings.base_settings
python manage.py runserver 0.0.0.0:8080
python manage.py migrate

Tag summary

Content type

Image

Digest

Size

454.5 MB

Last updated

almost 7 years ago

docker pull wischlabs/locality_finder