diff --git a/README.md b/README.md new file mode 100644 index 0000000..30890cd --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Guild Journal + +Guild Journal is a simple tool to keep track of table top adventures. +It is highly opinionated as I develop this for the group I play in. +I try to keep it agnostic of any specific system. + + +## Development + +``` +docker compose up +``` + +### Migrations + +#### Apply migrations +``` +docker compose exec app python manage.py migrate +``` + +#### Create migrations +``` +docker compose exec app python manage.py makemigrations +``` + +## Deployment + +### Build and publish docker image + +``` +./release.sh +``` + +### Use in Docker Compose + +``` + guild_journal: + image: git.libove.org/h4kor/guild-journal:latest + user: 1000:1000 + volumes: + - "./guild-journal:/data" + ports: + - "127.0.0.1:9011:8000" + restart: always + environment: + GUILD_JOURNAL_ENV: production + DJANGO_HOST: guild-journal.example.org + SECRET_KEY: keep-this-secret +``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9a43645 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.3' + +services: + app: + build: . + command: python manage.py runserver 0.0.0.0:8000 + ports: + - 8000:8000 + environment: + - GUILD_JOURNAL_ENV=development + volumes: + - .:/app diff --git a/guild_journal/settings/production.py b/guild_journal/settings/production.py index 21acc47..b003604 100644 --- a/guild_journal/settings/production.py +++ b/guild_journal/settings/production.py @@ -4,7 +4,7 @@ from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent.parent # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = "django-insecure-e*p%e)pwf+-ntt4wpn-^^7-0yq)!cjo*om18vy77-=*c0jjfqa" +SECRET_KEY = os.environ["SECRET_KEY"] # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False