Skip to content

Commit

Permalink
Merge pull request #97 from stuartmaxwell/docker-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartmaxwell authored Oct 1, 2024
2 parents f47ca0f + 5773557 commit 82df494
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
33 changes: 33 additions & 0 deletions docker-compose-stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
services:
app:
image: ghcr.io/stuartmaxwell/stuartm.nz:latest
entrypoint: /app/entrypoint.sh
command: gunicorn --worker-tmp-dir /dev/shm --workers=2 --worker-class=gthread --bind 0.0.0.0:8000 config.wsgi
user: "1000"
environment:
- "SECRET_KEY=${SECRET_KEY}"
- "DEBUG=${DEBUG}"
- "ALLOWED_HOSTS=${ALLOWED_HOSTS}"
- "EMAIL_HOST=${EMAIL_HOST}"
- "EMAIL_PORT=${EMAIL_PORT}"
- "EMAIL_HOST_USER=${EMAIL_HOST_USER}"
- "EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}"
- "EMAIL_USE_TLS=${EMAIL_USE_TLS}"
- "DEFAULT_FROM_EMAIL=${DEFAULT_FROM_EMAIL}"
- "DB_ENGINE=${DB_ENGINE}"
- "DB_HOST=${DB_HOST}"
- "DB_NAME=${DB_NAME}"
- "DB_PASSWORD=${DB_PASSWORD}"
- "DB_PORT=${DB_PORT}"
- "DB_USER=${DB_USER}"
- "WHITENOISE_STATIC=${WHITENOISE_STATIC}"
- "ADMIN_URL=${ADMIN_URL}"
- "SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT}"
- "SENTRY_DSN=${SENTRY_DSN}"
- "SENTRY_TRACES_SAMPLE_RATE=${SENTRY_TRACES_SAMPLE_RATE}"
- "BLOG_TITLE=${BLOG_TITLE}"
- "POST_PREFIX=${POST_PREFIX}"
- "POST_PERMALINK=${POST_PERMALINK}"
- "ARCHIVES_PATH_ENABLED=${ARCHIVES_PATH_ENABLED}"
- "ARCHIVES_PATH=${ARCHIVES_PATH}"
- "DATE_ARCHIVES_ENABLED=${DATE_ARCHIVES_ENABLED}"
15 changes: 12 additions & 3 deletions env.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ EMAIL_HOST_PASSWORD=
EMAIL_USE_TLS=
DEFAULT_FROM_EMAIL=
DB_ENGINE=
DB_HOST=
DB_NAME=
DB_USER=
DB_PASSWORD=
DB_HOST=
DB_PORT=
WHITENOISE_STATIC
DB_USER=
WHITENOISE_STATIC=
ADMIN_URL=
SENTRY_ENVIRONMENT=
SENTRY_DSN=
SENTRY_TRACES_SAMPLE_RATE=
BLOG_TITLE=
POST_PREFIX=
POST_PERMALINK=
ARCHIVES_PATH_ENABLED=
ARCHIVES_PATH=
DATE_ARCHIVES_ENABLED=
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ dc-logs-dev:
# Run a terminal on the development environment
dc-exec-dev:
docker compose --file docker-compose-dev.yml exec app /bin/bash

# Generate a secret key for Django
secret:
{{uv}} manage.py shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"

0 comments on commit 82df494

Please sign in to comment.