This project will focus on Django 2.0.7.
- Install Python 3.6.
- Clone this repository or download the zip
git clone https://github.com/Cynthesize/backend/
- Make sure you're in the directory you just created:
cd backend
- Create a Python venv:
virtualenv .venv
- Activate the venv:
"source .venv/bin/activate"
- Install Python requirements:
pip install -r requirements.txt
- Move to source directory:
cd src/
- Set required environment variables:
export POSTGRESQL_ADDON_DB='<DB_NAME>' export POSTGRESQL_ADDON_HOST='<DB_HOST>' export POSTGRESQL_ADDON_PASSWORD='<DB_PASSWORD>' export POSTGRESQL_ADDON_PORT='<DB_PORT>' export POSTGRESQL_ADDON_USER='<DB_USER>' export DJANGO_SECRET='<YOUR_DJANGO_SECRET>'
- Migrate models to database and Collect static files:
python manage.py makemigrations users python manage.py makemigrations ideas python manage.py migrate users python manage.py migrate ideas python manage.py collectstatic
- Run development server:
python manage.py runserver <PORT_NUMBER>
Required environment variables:
POSTGRESQL_ADDON_DB='<DB_NAME>'
POSTGRESQL_ADDON_HOST='<DB_HOST>'
POSTGRESQL_ADDON_PASSWORD='<DB_PASSWORD>'
POSTGRESQL_ADDON_PORT='<DB_PORT>'
POSTGRESQL_ADDON_USER='<DB_USER>'
DJANGO_SECRET='<YOUR_DJANGO_SECRET>'
See Dockerfile for details.
This project follows the GNU GPLv3. See the LICENSE for details.