YABin
A pastebin that contains plentiful features while remaining simple. Supports optional E2E encryption, a client-side CLI app, syntax highlighting, minimalistic UI, APIs, keyboard shortcuts, and more. It can even be run in serverless environments.
Directory Structure
- .env
- docker-compose.yml
docker-compose.yml
version: "3.3"
networks:
yabin-network:
name: yabin-network
ipam:
driver: default
services:
yabin:
container_name: yabin
ports:
- ${PORT:-3000}:${PORT:-3000}
image: yureien/yabin:latest
env_file: .env
depends_on:
- db
networks:
- yabin-network
db:
container_name: yabin-db
restart: always
image: postgres:15-alpine
env_file: .env
expose:
- "5432"
environment:
POSTGRES_USER: ${DB_USER:-yabin_user}
POSTGRES_PASSWORD: ${DB_USER_PASS:-123}
POSTGRES_DB: ${DB_NAME:-yabin_db}
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- ./db-data:/var/lib/postgresql/data
networks:
- yabin-network.env
PORT=3000
SALT="this is a very insecure salt, change it"
DB_PROVIDER=postgres
DB_NAME=mydb
DB_HOST=db # db refers to the name of the service in docker-compose.yml
DB_USER=johndoe
DB_PASSWORD=randompassword
# do not modify. copy as-is. dotenv-expand will replace the variables
DATABASE_URL=${DB_PROVIDER}://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:5432?schema=public
MAIL_ENABLED=false
MAIL_SERVER=smtp.gmail.com
MAIL_PORT=465
MAIL_USE_SSL=true
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM=YABin <yabin@sohamsen.me>
PUBLIC_REGISTRATION_ENABLED=true
PUBLIC_CUSTOM_PATHS_ENABLED=true
PUBLIC_ANONYMOUS_PASTES_ENABLED=true
PUBLIC_URL=http://localhost:5173
ORIGIN=http://localhost:5173Resources
Website: https://bin.sohamsen.me/
GitHub: https://github.com/Yureien/YABin
Docker Hub: https://hub.docker.com/r/yureien/yabin
Configuration: https://github.com/Yureien/YABin#how-to-host