Self-hosted video game clips website using Bun, bun:sqlite, & FFmpeg.
Work-in-progress, especially the UI design
- Build a Docker image with the provided Dockerfile
- Setup a Discord OAuth app at https://discord.com/developers/applications
- Include the following env variables when deploying your Docker app: DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, DISCORD_REDIRECT_URI
- Pull your Discord User ID by enabling Developer Mode on Discord and right clicking your profile picture
- Supply your Discord User ID in the DISCORD_ADMINS & DISCORD_WHITELIST env variables
- Modify STORAGE_PATH and DATABASE env variables for platform storage in Docker volumes
- Expose the container server port (default: 3000) to a reverse proxy
Name | Description | Default |
---|---|---|
DISCORD_CLIENT_ID | Discord OAuth client id | |
DISCORD_CLIENT_SECRET | Discord OAuth client secret | |
DISCORD_REDIRECT_URI | Discord OAuth redirect uri | |
DISCORD_WHITELIST | Comma-separated list of Discord user id's for signups | |
DISCORD_ADMINS | Comma-separated list of site admins by Discord user id | |
STORAGE_PATH | Storage path for uploads | ./storage |
DATABASE | SQLite storage path | clips.sqlite |
GATEWAY_HOSTNAME | HTTP server hostname | 0.0.0.0 |
GATEWAY_PORT | HTTP server port | 3000 |
GATEWAY_ENV | Environment | prod with bun start , dev with bun dev |
GATEWAY_DEBUG | console.debug output | false |
GATEWAY_CACHE_TTL | Cache-Control max age | 3600 |
GATEWAY_JSON_ERRORS | Whether to output errors in JSON responses | true |
bun i
bun gen {name}
bun gen test
# or
bun gen test.ts
# 📝 pages/test.ts created.
The new route will automatically open in Visual Studio Code.
bun dev
bun start
This project was created with Bun, a fast all-in-one JavaScript runtime.