Webseite für den Braunschweiger Kanumarathon - Django Rewrite
- Python 44.4%
- HTML 28.9%
- JavaScript 16.3%
- CSS 9.8%
- Shell 0.4%
- Other 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bskm | ||
| config | ||
| nginx | ||
| templates | ||
| .containerignore | ||
| .gitignore | ||
| compose.importer.yml | ||
| compose.yml | ||
| Containerfile | ||
| entrypoint.sh | ||
| importer.py | ||
| manage.py | ||
| README.md | ||
| requirements.txt | ||
BSKM Website
Setup
.env file
HOST_PORT=80
HOST=bs-km.de
DEBUG=false
SECRET_KEY=secret
POSTGRES_PASSWORD=bskm
EMAIL_HOST=mail.3po.ch
EMAIL_PORT=465
EMAIL_USE_SSL=true
EMAIL_HOST_USER=info
EMAIL_HOST_PASSWORD=secret
DEFAULT_FROM_EMAIL=info@example.com
Development
create compose.override.yml file:
services:
nginx:
volumes:
- ./nginx/dev.conf.d:/etc/nginx/conf.d:ro
django:
volumes:
- .:/app
build/start/stop
podman compose build
podman compose up -d
podman compose down
create superuser
podman compose exec django python manage.py createsuperuser
Import Legacy Database Dump
The importer will import users, entries and posts from a dump of the old php site's database.
- First, start the new site normally and set up the event_number. This number will be used for all imported entries.
- Copy the database dump to
legacy-db-dump.sql. - Run
podman compose -f compose.yml -f compose.importer.yml up -d. This will import the dump into a separate postgres 10 database, run the importer script and then start the site normally. - Confirm the data has been imported correctly.
- Run
podman compose -f compose.yml -f compose.importer.yml down.