Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

Replace passport:keys --show with the command that actually works (#521)

Gss99206c7fdbef
diff --git a/compose.prod.yaml b/compose.prod.yaml
index a4b385037..582add49c 100644
--- a/compose.prod.yaml
+++ b/compose.prod.yaml
@@ -54,9 +54,14 @@ services:
# REQUIRED for any durable deploy (and always for multi-node / load
# balancers). File keys under storage/ are NOT persisted by the volumes
# below — without these env vars a container recreate issues new keys and
- # invalidates every API/MCP token. Generate once:
- # docker compose -f compose.prod.yaml run --rm app php artisan passport:keys --show
- # then paste the PEM contents here (use \n for newlines).
+ # invalidates every API/MCP token. Generate a pair once — the command
+ # writes files under storage/, so generate and print in the same
+ # container, otherwise --rm takes them away:
+ # docker compose -f compose.prod.yaml run --rm --no-deps app sh -c \
+ # 'php artisan passport:keys --force >/dev/null && cat storage/oauth-private.key storage/oauth-public.key'
+ # PASSPORT_PRIVATE_KEY prints first, PASSPORT_PUBLIC_KEY second. Paste
+ # each as a YAML block scalar, or as one line with literal \n newlines.
+ # (passport:keys has no --show flag; it only writes the two files.)
PASSPORT_PRIVATE_KEY: ""
PASSPORT_PUBLIC_KEY: ""
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 742753b41..61219d999 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -95,7 +95,8 @@ if [ -n "${PASSPORT_PRIVATE_KEY:-}" ] && [ -n "${PASSPORT_PUBLIC_KEY:-}" ]; then
echo "[entrypoint] using Passport keys from environment"
elif [ "${TRYPOST_TARGET:-}" = "production" ] || [ "${APP_ENV:-}" = "production" ]; then
echo "[entrypoint] ERROR: PASSPORT_PRIVATE_KEY and PASSPORT_PUBLIC_KEY must be set in production." >&2
- echo "[entrypoint] Generate once with: php artisan passport:keys --show" >&2
+ echo "[entrypoint] Generate once with: php artisan passport:keys --force" >&2
+ echo "[entrypoint] then read storage/oauth-private.key and storage/oauth-public.key. passport:keys has no --show flag." >&2
exit 1
elif [ ! -f storage/oauth-private.key ] || [ ! -f storage/oauth-public.key ]; then
echo "[entrypoint] generating Passport keys (dev fallback)"