-
adduser archiveooo
. You can also haveperiodic_archiveooo
andrunner_archiveooo
users with limited file access. -
Checkout the code in
/home/archiveooo/archiveooo
-
Create the
/home/archiveooo/archiveooo/env
virtualenv with requirements.txt -
Create your
/home/archiveooo/archiveooo/archiveooo/local_settings_outside_git.py
-- see the example -
Create the Postgres database and user or use the default local SQLite. Default Ubuntu settings should be fine.
-
Setup AWS EC2. You can have separate accounts for the main site and the periodic cleaner. See sample IAM policy.
-
Setup the non-cloudfronted website. See the Apache sample files in this folder. Make sure to expose the static files too: for instance,
ln -sr ctfoood/static/ /var/www/html/
(+ Django's contrib/admin/static/admin/) -
Create an S3 bucket to host public files. Otherwise, create
dockerimg
andpublic_files
folders and link them in/var/www/html/
. -
Setup the periodic cleanup scripts: periodic_archiveooo.crontab and weekly_docker_cleanup.
-
Optionally, create accounts for Dockerhub and reCAPTCHA.
-
Optionally, setup email sending. In production, we use Postfix setup to talk to Amazon SES.
-
Optionally, setup AWS CloudFront. Our setup uses Origin cache headers (see the setup in
views.py
and in apache files), forwards all cookies and query strings. -
Classic Django site setup:
./manage.py makemigrations
./manage.py makemigrations ctfoood
./manage.py migrate
./manage.py createsuperuser
- Use the admin interface to create a group and add the superuser to it. (Chals are associated to the creator user's group, there's expected to be one.)