1.8 KiB
1.8 KiB
Coolify Deployment Guide for Internal Freight App
Prerequisites
- Supabase project URL & anon key (set in
.env) - Node.js >= 18 (handled via Docker build)
- Your VPS has Docker + Coolify installed
File Structure
internal-freight-app/
├── Dockerfile # Docker build for Coolify
├── .dockerignore # Ignore unwanted files
├── .env.example # Environment variables template
├── nginx.conf # Nginx reverse proxy config (default Coolify)
├── vite.config.ts # Vite config (for asset handling)
├── src/
│ └── ... # React + TypeScript source
└── package.json
Deployment Steps on Coolify
-
Create Application in Coolify
- Source: Git Repository → URL =
http://forgejo-vil3xyowqk0qsh4hiqy77e3h.187.127.178.110.sslip.io/iamcoolvivek007/internal-freight-app.git - Build Pack: Dockerfile
- Port:
5173(Vite dev) or3000(if using a different server)
- Source: Git Repository → URL =
-
Environment Variables
- In Coolify > Application > Environment, set these:
VITE_SUPABASE_URL= your Supabase project URL (e.g.,https://xyz.supabase.co)VITE_SUPABASE_ANON_KEY= your Supabase anon/public key
- In Coolify > Application > Environment, set these:
-
Deploy
- Click Save & Deploy. Coolify will push every commit to main automatically (or via webhook).
-
Database
- Apply the Supabase schema from
supabase-schema.sqlin Supabase SQL Editor:-- (schema content)
- Apply the Supabase schema from
Local Development (Optional)
git clone <repo-url>
cp .env.example .env
# Set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY
npm install
npm run dev
Notes
- All data stored in Supabase (no local database required).
- For production, swap
npm run devwithnpm run previewor add a Nginx server in Coolify (Dockerfile handles this automatically).