Create without Docker
Set up a Grit project using cloud services instead of Docker. Perfect for machines where Docker isn't available or when you prefer managed services.
Prerequisites
You don't need Docker at all. Just make sure you have these installed:
- Go 1.21+ —
go version - Node.js 18+ —
node --version - pnpm —
npm install -g pnpm - Grit CLI —
go install github.com/MUKE-coder/grit/v2/cmd/grit@latest
Step 1: Create your project
Scaffold a new Grit project as usual:
The CLI will generate all the files, including .env, .env.cloud.example, and docker-compose.yml. You'll ignore the Docker files and configure cloud services instead.
Step 2: Set up cloud services
Instead of running PostgreSQL, Redis, and MinIO in Docker containers, you'll use managed cloud services. All of these have generous free tiers.
- Create a free account at neon.tech
- Create a new project (pick a region close to you)
- Copy the connection string from the dashboard
It looks like this:
DATABASE_URL=postgres://user:password@ep-xxx-xxx-123456.us-east-2.aws.neon.tech/neondb?sslmode=require
- Create a free account at upstash.com
- Create a new Redis database
- Copy the Redis URL (TLS enabled)
It looks like this:
REDIS_URL=rediss://default:your-password@your-endpoint.upstash.io:6379
Note the rediss:// (with double 's') — that's TLS-encrypted Redis.
- Go to Cloudflare Dashboard → R2
- Create a bucket (e.g.
myapp-uploads) - Go to Manage R2 API Tokens → Create Token
- Copy the endpoint, access key, and secret key
STORAGE_DRIVER=r2R2_ENDPOINT=https://your-account-id.r2.cloudflarestorage.comR2_ACCESS_KEY=your-r2-access-key-idR2_SECRET_KEY=your-r2-secret-access-keyR2_BUCKET=myapp-uploadsR2_REGION=auto
Alternatively, you can use Backblaze B2 — set STORAGE_DRIVER=b2 and configure the B2 variables instead.
- Sign up at resend.com
- Verify your domain (or use the sandbox for testing)
- Create an API key
RESEND_API_KEY=re_your_api_key_hereMAIL_FROM=noreply@yourdomain.com
Step 3: Configure your .env
Grit scaffolds a .env.cloud.example file with all the cloud variables pre-filled as placeholders. Copy it and fill in your keys:
Then open .env and replace the placeholder values with your actual cloud service credentials. Here's the full template:
# AppAPP_NAME=myappAPP_ENV=developmentAPP_PORT=8080APP_URL=http://localhost:8080# Database (Neon)DATABASE_URL=postgres://user:password@ep-xxx.neon.tech/neondb?sslmode=require# JWTJWT_SECRET=change-me-to-a-random-string-at-least-32-charsJWT_ACCESS_EXPIRY=15mJWT_REFRESH_EXPIRY=168h# Redis (Upstash)REDIS_URL=rediss://default:your-password@your-endpoint.upstash.io:6379# Storage (Cloudflare R2)STORAGE_DRIVER=r2R2_ENDPOINT=https://your-account-id.r2.cloudflarestorage.comR2_ACCESS_KEY=your-r2-access-key-idR2_SECRET_KEY=your-r2-secret-access-keyR2_BUCKET=myapp-uploadsR2_REGION=auto# Email (Resend)RESEND_API_KEY=re_your_api_key_hereMAIL_FROM=noreply@yourdomain.com# CORSCORS_ORIGINS=http://localhost:3000,http://localhost:3001# GORM StudioGORM_STUDIO_ENABLED=trueGORM_STUDIO_USERNAME=adminGORM_STUDIO_PASSWORD=change-me-in-prod
Step 4: Start developing
With cloud services configured, you can run everything locally without Docker:
1. Install dependencies
2. Start the Go API
Runs on http://localhost:8080. Auto-migrates the database on first run.
3. Start the frontend apps (in separate terminals)
Web on http://localhost:3000, Admin on http://localhost:3001
Docker vs Cloud: when to use which
| Docker (default) | Cloud services | |
|---|---|---|
| Setup | docker compose up -d | Sign up for 3-4 services |
| Cost | Free (local) | Free tiers available |
| Offline | Works offline | Needs internet |
| Resources | Uses local RAM/CPU | Lightweight locally |
| Best for | Most developers | Low-spec machines, CI/CD |
Pro tip: use cloud for production too
If you set up cloud services for development, you already have your production infrastructure ready. Just create separate Neon projects and R2 buckets for staging and production, and you're good to deploy.