A pastebin service that you actually own.
- A good looking web client, powered by Vue.JS
- Beautiful syntax highlighting, powered by Shiki
- A language detector that is good enough, powered by Flourite
- Administration capabilities
Create a docker-compose.yml file with the following contents:
x-common-env: &common-env
PASTORE_JWT_SECRET: supersecret
PASTORE_INITIAL_ADMIN_PASSWORD: supersecret
PASTORE_DATABASE_HOST: db
PASTORE_DATABASE_NAME: &db_name pastore
PASTORE_DATABASE_PASSWORD: &db_password changeme
PASTORE_DATABASE_USERNAME: &db_user pastore
PASTORE_LOG_STRUCTURED: true
PASTORE_LOG_LEVEL: debug
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_PASSWORD: *db_password
POSTGRES_USER: *db_user
POSTGRES_DB: *db_name
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
interval: 10s
timeout: 3s
retries: 3
migrate:
image: parsajr/pastore
command: uv run alembic -c ./app/alembic.ini upgrade head
environment:
<<: *common-env
depends_on:
db:
condition: service_healthy
restart: "no"
api:
image: parsajr/pastore
environment:
<<: *common-env
depends_on:
migrate:
condition: service_completed_successfully
ports:
- "8080:80"
restart: unless-stopped
volumes:
postgres-data:
It defines three services:
-
A PostgreSQL database container
dbwhich stores all the persistent data. -
A migration service that runs off the alembic migration script to make the database schema ready to consume for the api.
-
Api service which runs the Pastore api and hosts its frontend client.