This guide will walk you through setting up Dockerflare for development and deployment.
Before installing Dockerflare, ensure you have:
- Node.js: Version 18+ (LTS recommended)
- Bun: Latest version (for optimal performance)
- Docker: Latest stable version with Docker Engine API enabled
- Cloudflare WARP: Installed and configured on Docker hosts
# Clone the repository
git clone https://github.com/Hiutaky/dockerflare.git
cd dockerflare
# Install dependencies
bun install# Install dependencies
bun install
# Set up the database
bunx prisma generate
bunx prisma migrate dev --name initCreate environment files as needed:
cp .env.example .envNODE_ENV=development
PORT=3000
DATABASE_URL="file:./dev.db"
# your cloudflare api token
CLOUDFLARE_ACCOUNT_ID=""
CLOUDFLARE_API_TOKEN=""
# Add any additional environment variables your deployment requiresbun devOpen http://localhost:3000 to access Dockerflare.
# Start development server
bun run dev
# Start with debugging
bun run dev --inspect
# Production mode
NODE_ENV=production bun run start# Generate Prisma client
bunx prisma generate
# Create and run migrations
bunx prisma migrate dev
# View database in browser
bunx prisma studio
# Reset database (development only)
bunx prisma migrate reset# Lint code
bun lint:fix
# Type check
bunx tsc --noEmit
# Format code
bun prettier:fix