Skip to content

Commit

Permalink
Merge pull request #170 from stuartmaxwell:post-to-bluesky
Browse files Browse the repository at this point in the history
Post-to-bluesky
  • Loading branch information
stuartmaxwell authored Dec 4, 2024
2 parents d4db362 + f803197 commit b89a8db
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 39 deletions.
8 changes: 8 additions & 0 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
CONTACT_FORM_FROM=(str, ""),
DEBUGGING_APP_PATH=(str, "this-is-just-a-temporary-debugging-app-path"),
LOGFIRE_ENVIRONMENT=(str, "dev"),
BLUESKY_APP_PASSWORD=(str, ""),
)

environ.Env.read_env(Path(BASE_DIR / ".env"))
Expand Down Expand Up @@ -274,6 +275,7 @@
"MARKDOWN_RENDERER": "config.markdown_renderer.mistune_renderer",
"PLUGINS": [
"djpress_publish_mastodon",
"djpress_publish_bluesky",
],
"PLUGIN_SETTINGS": {
"djpress_publish_mastodon": {
Expand All @@ -282,6 +284,12 @@
"status_message": "🚀 I created a new blog post!\n\n",
"base_url": "https://stuartm.nz/",
},
"djpress_publish_bluesky": {
"handle": "stuartm.nz",
"app_password": env("BLUESKY_APP_PASSWORD"),
"site_url": "https://stuartm.nz/",
"post_message": "🚀 I created a new blog post!",
},
},
}

Expand Down
34 changes: 1 addition & 33 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,7 @@ services:
entrypoint: /app/entrypoint.sh
command: uv run --no-cache gunicorn --worker-class uvicorn_worker.UvicornWorker --worker-tmp-dir /dev/shm --workers=2 --max-requests=1000 --max-requests-jitter=50 --bind 0.0.0.0:8000 config.asgi:application
user: "1000"
environment:
- "S3_BUCKET=${S3_BUCKET}"
- "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}"
- "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}"
- "AWS_ENDPOINT_URL=${AWS_ENDPOINT_URL}"
- "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}"
- "RESEND_API_KEY=${RESEND_API_KEY}"
- "CONTACT_FORM_TO=${CONTACT_FORM_TO}"
- "CONTACT_FORM_FROM=${CONTACT_FORM_FROM}"
- "DEBUGGING_APP_PATH=${DEBUGGING_APP_PATH}"
- "LOGFIRE_ENVIRONMENT=${LOGFIRE_ENVIRONMENT}"
- "LOGFIRE_TOKEN=${LOGFIRE_TOKEN}"
env_file: .env
volumes:
- app_db:/app/db

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies = [
"uvicorn>=0.32.1",
"uvicorn-worker>=0.2.0",
"logfire[asgi,django]>=2.5.0",
"djpress-publish-bluesky>=1.0.0",
]

[tool.curlylint.rules]
Expand Down
27 changes: 21 additions & 6 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b89a8db

Please sign in to comment.