Getting started

Note

These instructions assume familiarity with Docker and Docker Compose.

Development & Production Version

The Project comes with 2 different Docker-Compose files wich are for development local.yml and production production.yml.

The development version start the website in debug mode and bind the local path ./ to the django docker contaiers path /app.

For the production version, the docker container is build with the code inside of the container. Also the production version use redis as caching backend.

Quick install (Development Version)

Build the docker container.

$ docker-compose -f local.yml build

Create the sql tables or update the tables.

$ docker-compose -f local.yml run django python manage.py migrate

Create a new superuser account.

$ docker-compose -f local.yml run django python manage.py createsuperuser

Add Elasticsearch index.

$ docker-compose -f local.yml run django python manage.py update_index

Load the Meetup Sandbox Group with all events.

$ docker-compose -f local.yml run django python manage.py update_group --sandbox

Start the website.

$ docker-compose -f local.yml up

Now you can go to http://localhost:8000/ to visist your local site or to http://localhost:8000/admin/ to log in your admin panel.

Quick install (Production Version)

Settings

At first create the directory ./.envs/.production

$ mkdir ./.envs\.production`

For Django container create a file ./.envs/.production/.django wich should look like:

Warning

Change DJANGO_SECRET_KEY & DJANGO_ADMIN_URL with your random strings.

Don’t share the DJANGO_SECRET_KEY with anybody!

Share the DJANGO_ADMIN_URL only with the admins and moderators of the page! DJANGO_ADMIN_URL is the path for the admin panel, in this case it will be https://meetup-data-scraper.de/7qW3YfapGX9k3zNVftQm/

For Elasticsearch container create a file ./.envs/.production/.elasticsearch wich should look like below. For further information how to setup Elasticsearch with enviroment vars got to https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html

For Postgres container create a file ./.envs/.production/.postgres wich should look like:

Setup

Build the docker container.

$ docker-compose -f production.yml build

Create the sql tables or update the tables.

$ docker-compose -f production.yml run django python manage.py migrate

Add Elasticsearch index.

$ docker-compose -f production.yml run django python manage.py update_index

Create a new superuser account.

$ docker-compose -f production.yml run django python manage.py createsuperuser

Start the website.

$ docker-compose -f local.yml up -d

Note

For deployment instructions visit https://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html

!! There is no need to add a media storage (AWS S3 or GCP) for this project like it is described in cookiecutter-django docs !!