2021-11-21 12:54:59 +01:00
2021-11-21 12:54:59 +01:00
2021-11-14 09:35:32 +01:00
2021-10-09 09:53:46 +01:00
2021-10-09 09:53:46 +01:00
2021-11-14 09:35:32 +01:00
2021-11-21 13:06:42 +01:00
2021-11-14 09:35:32 +01:00
2021-11-14 09:35:32 +01:00
2021-10-09 09:53:46 +01:00
2021-10-09 09:53:46 +01:00
2021-10-09 09:53:46 +01:00
2021-11-05 09:26:46 +01:00
2021-10-09 09:53:46 +01:00
2021-10-09 09:53:46 +01:00
2021-11-14 09:30:59 +01:00
2021-10-09 09:53:46 +01:00
2021-10-09 09:53:46 +01:00
2021-10-09 09:53:46 +01:00
2021-10-09 09:53:46 +01:00
2021-11-14 09:35:32 +01:00

Forum

Overview

A Django project starter kit

Local Development Setup

This project will use Python 3.8, Docker, and Docker Compose.

Make a Python 3.8.x virtualenv.

Copy .env-dist to .env and adjust values to match your local environment:

$ cp .env-dist .env

Then run:

# rebuild our services
$ docker-compose build

# start our services
$ docker-compose up

# start our services with daemon mode
$ docker-compose up -d

# to create a superuser
$ docker-compose run --rm web python manage.py createsuperuser

# to create database migrations
$ docker-compose run --rm web python manage.py makemigrations

# to run database migrations
$ docker-compose run --rm web python manage.py migrate

This will create the Docker image, install dependencies, start the services defined in docker-compose.yml, and start the webserver.

Cleaning up

To shut down our database and any long running services, we shut everyone down using:

$ docker-compose down

Running with Celery and Redis

Forum ships with Celery and Redis support, but they are off by default. To rebuild our image with support, we need to pass the docker-compose-with-celery.yml config to Docker Compose via:

# rebuild our services
$ docker-compose -f docker-compose-with-celery.yml build

# start our services
$ docker-compose -f docker-compose-with-celery.yml up

# start our services with daemon mode
$ docker-compose -f docker-compose-with-celery.yml up -d

# stop and unregister all of our services
$ docker-compose -f docker-compose-with-celery.yml down

Running the tests

To run the tests, execute:

$ docker-compose run --rm web pytest

Deploying

TDB

Production Environment Considerations

TDB

Description
Mirrored via gitea-mirror
Readme 28 MiB
Languages
HTML 67.4%
Python 25.8%
CSS 4.9%
Shell 0.9%
PowerShell 0.3%
Other 0.5%