Third crossposting target on the ADR-065 loop (ADR-069). Text posts get a link preview, 1 image posts as IMAGE and 2-4 as a CAROUSEL (Meta fetches them from /media/), with alt text and the first tag as topic_tag. Posts are shortened to 500 characters, counting non-ASCII as UTF-8 bytes. Edits don't follow (the API has no edit); unpublish and delete remove the post. Retried creates check for an existing post first. The 60-day token is refreshed daily from the worker loop and kept in DATA_PATH/threads_token.json under a file lock; a new configured token replaces it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
137 lines
4.7 KiB
Bash
137 lines
4.7 KiB
Bash
# StarPunk Configuration Template
|
|
# Copy this file to .env and fill in your values
|
|
# DO NOT commit .env to version control
|
|
|
|
# =============================================================================
|
|
# SITE CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Public URL where your site is hosted (no trailing slash)
|
|
SITE_URL=http://localhost:5000
|
|
|
|
# Your site name (appears in RSS feed and page titles)
|
|
SITE_NAME=My StarPunk Site
|
|
|
|
# Your name (appears as author in RSS feed)
|
|
SITE_AUTHOR=Your Name
|
|
|
|
# Site description (appears in RSS feed)
|
|
SITE_DESCRIPTION=My personal IndieWeb site
|
|
|
|
# =============================================================================
|
|
# AUTHENTICATION
|
|
# =============================================================================
|
|
|
|
# Your identity URL (REQUIRED)
|
|
# Your personal website. Used as the author h-card source and as the "me"
|
|
# value in Micropub tokens. It should link to this site's IndieAuth metadata
|
|
# (see docs/decisions/ADR-064) so Micropub apps can find StarPunk.
|
|
ADMIN_ME=https://your-website.com
|
|
|
|
# Admin login via OpenID Connect (REQUIRED in production)
|
|
# Register StarPunk as a confidential client with your provider (e.g. Pocket ID)
|
|
# using the callback URL: <SITE_URL>/auth/callback
|
|
OIDC_ISSUER=https://id.example.com
|
|
OIDC_CLIENT_ID=
|
|
OIDC_CLIENT_SECRET=
|
|
# The provider's subject ("sub") of the one account allowed to log in.
|
|
# Pocket ID: the user's ID shown in the admin user list.
|
|
OIDC_ADMIN_SUB=
|
|
# Name shown on the login button (default: "single sign-on")
|
|
OIDC_PROVIDER_NAME=Pocket ID
|
|
|
|
# Session secret key (REQUIRED - GENERATE A RANDOM VALUE)
|
|
# Generate with: python3 -c "import secrets; print(secrets.token_hex(32))"
|
|
SESSION_SECRET=REPLACE_WITH_RANDOM_SECRET
|
|
|
|
# Session lifetime in days (default: 30)
|
|
SESSION_LIFETIME=30
|
|
|
|
# Lifetime of Micropub access tokens StarPunk issues, in days (default: 90)
|
|
INDIEAUTH_TOKEN_LIFETIME_DAYS=90
|
|
|
|
# =============================================================================
|
|
# CROSSPOSTING (optional, v2.1.0)
|
|
# =============================================================================
|
|
|
|
# GoToSocial or Mastodon account to copy new notes to. Create an app token
|
|
# with scopes: write:statuses write:media
|
|
GOTOSOCIAL_URL=
|
|
GOTOSOCIAL_ACCESS_TOKEN=
|
|
# Name shown in the editor and Micropub apps (default: GoToSocial)
|
|
GOTOSOCIAL_NAME=GoToSocial
|
|
# public, unlisted, private (default: public)
|
|
GOTOSOCIAL_VISIBILITY=public
|
|
|
|
# Threads account (v2.6.0). A long-lived user token with threads_basic,
|
|
# threads_content_publish and threads_delete; StarPunk refreshes it daily and
|
|
# keeps the current one in DATA_PATH/threads_token.json.
|
|
# How to get one: docs/design/v2.6.0/2026-10-31-threads-crossposting.md
|
|
THREADS_ACCESS_TOKEN=
|
|
# Your Threads username (for the Micropub syndicate-to uid)
|
|
THREADS_USERNAME=
|
|
|
|
# =============================================================================
|
|
# DATA STORAGE
|
|
# =============================================================================
|
|
|
|
# Base data directory (relative to project root)
|
|
DATA_PATH=./data
|
|
|
|
# Notes directory (where markdown files are stored)
|
|
NOTES_PATH=./data/notes
|
|
|
|
# SQLite database path
|
|
DATABASE_PATH=./data/starpunk.db
|
|
|
|
# =============================================================================
|
|
# FLASK CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Environment: development or production
|
|
FLASK_ENV=development
|
|
|
|
# Debug mode: 1 (on) or 0 (off)
|
|
# NEVER use debug mode in production
|
|
FLASK_DEBUG=1
|
|
|
|
# Flask secret key (falls back to SESSION_SECRET if not set)
|
|
FLASK_SECRET_KEY=
|
|
|
|
# =============================================================================
|
|
# RSS FEED CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Maximum number of items in RSS feed (default: 50)
|
|
FEED_MAX_ITEMS=50
|
|
|
|
# Feed cache duration in seconds (default: 300 = 5 minutes)
|
|
FEED_CACHE_SECONDS=300
|
|
|
|
# =============================================================================
|
|
# CONTAINER CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Environment: development or production
|
|
ENVIRONMENT=production
|
|
|
|
# Number of Gunicorn workers (default: 4)
|
|
# Recommendation: (2 x CPU cores) + 1
|
|
WORKERS=4
|
|
|
|
# Worker timeout in seconds (default: 30)
|
|
WORKER_TIMEOUT=30
|
|
|
|
# Max requests per worker before restart (prevents memory leaks)
|
|
MAX_REQUESTS=1000
|
|
|
|
# =============================================================================
|
|
# DEVELOPMENT OPTIONS
|
|
# =============================================================================
|
|
|
|
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
|
|
LOG_LEVEL=INFO
|
|
|
|
# Enable SQL query logging (development only)
|
|
SQL_ECHO=0
|