-
Notifications
You must be signed in to change notification settings - Fork 3
Installing challenge
Mathias Bøhn Grytemark edited this page Sep 27, 2017
·
12 revisions
Work in progress
We use postgresql, python3, django, redis and celery.
- Use postgresql databases (
apt install postgresql libpq-dev
) - Have python3 and python3-pip installed (
apt install python3-pip python3-venv
)- also python3-venv if you don't create virtualenvs some other way
- git clone
- cd to project directory
- create virtual environment (
make env
) - activate virtual environment (
source env/bin/activate
) - install dependencies (
make prod
) - set up database (create user and db)
- set up project settings (
cp challenge/settings/prod_example.py challenge/settings/prod.py
andsensible-editor challenge/settings/prod.py
) - set up SQL, migrate (
DJANGO_SETTINGS_MODULE='challenge.settings.prod' make migrate
) - gather static files (
make collect_static
) - set up webserver
- example config for apache2 on debian
- remember to use HTTPS, we're dependent on passwords/secrets and many of our users use wifi while solving the challenge
- install redis (
redis-server
) - set up celery
- based on http://docs.celeryproject.org/en/latest/userguide/daemonizing.html#usage-systemd
- see examples
- reload systemctl-daemon (
systemctl reload-daemon
) - start celery (
systemctl start celery-challenge
)