postio / Dockerfile
Leon4gr45's picture
Switch Space Dockerfile to OpenPost (pre-built image) after repeated Postiz build OOMs
63a0073 verified
Raw History Blame Contribute Delete
1.25 kB
# OpenPost — lightweight self-hosted social media scheduler.
# Uses the official pre-built image, so Hugging Face only pulls layers
# instead of compiling anything (this Space's previous Postiz-based
# deployment consistently OOMKilled during its Next.js frontend build
# on the free cpu-basic tier).
FROM ghcr.io/getopenpost/openpost:latest
# Hugging Face Docker Spaces route all traffic to this port (see README app_port).
ENV OPENPOST_PORT="7860"
ENV OPENPOST_EDITION="selfhost"
# Public URL of this Space — required for CORS/redirects and WebAuthn/passkeys.
ENV OPENPOST_APP_URL="https://leon4gr45-postio.hf.space"
ENV OPENPOST_PUBLIC_URL="https://leon4gr45-postio.hf.space"
# SQLite + local media, matching OpenPost's default single-container setup.
# Note: the Space's filesystem is ephemeral on the free tier, so this data
# does not survive a Space restart/rebuild unless persistent storage is
# enabled in the Space's Settings.
ENV OPENPOST_DATABASE_DRIVER="sqlite"
ENV OPENPOST_DATABASE_PATH="/data/db/openpost.db"
ENV OPENPOST_STORAGE_DRIVER="local"
ENV OPENPOST_MEDIA_PATH="/data/media"
# OPENPOST_JWT_SECRET and OPENPOST_ENCRYPTION_KEY are set as Space secrets
# (Settings -> Variables and secrets), not baked in here.
EXPOSE 7860