Dokploy Deployment
Dokploy Deployment
Section titled “Dokploy Deployment”Dokploy provides automated deployment dengan reverse proxy, SSL, dan monitoring built-in.
Prerequisites
Section titled “Prerequisites”- Server dengan Docker installed
- Domain name pointed ke server IP
- Dokploy installed di server (dokploy.com for setup)
Step 1: Create Application
Section titled “Step 1: Create Application”- Login ke Dokploy dashboard
- Klik “New Application”
- Pilih “Compose” atau “Application”
[SCREENSHOT: Dokploy dashboard showing New Application button]Step 2: Connect Git Repository
Section titled “Step 2: Connect Git Repository”- Pilih GitHub sebagai Git provider
- Authorize Dokploy untuk akses repository
- Pilih repository
merqdari list
[SCREENSHOT: Git provider selection showing GitHub option]Step 3: Configure Build Settings
Section titled “Step 3: Configure Build Settings”Backend Service
Section titled “Backend Service”| Setting | Value |
|---|---|
| Name | merq-backend |
| Repository | Syskita/merq |
| Branch | main |
| Build Type | Dockerfile |
| Dockerfile Path | merq-backend/Dockerfile |
| Build Context | merq-backend |
[SCREENSHOT: Build configuration form for backend]Web Dashboard Service
Section titled “Web Dashboard Service”| Setting | Value |
|---|---|
| Name | merq-web |
| Repository | Syskita/merq |
| Branch | main |
| Build Type | Nixpacks atau custom Dockerfile |
| Build Context | merq-web |
Step 4: Set Environment Variables
Section titled “Step 4: Set Environment Variables”Klik tab “Environment” dan masukkan semua variables:
[SCREENSHOT: Environment variables UI showing variable input form]Lihat Environment Variables Reference untuk daftar lengkap.
Required Variables (Backend)
Section titled “Required Variables (Backend)”# DatabaseDB_HOST=postgresDB_PORT=5432DB_USER=merqDB_PASSWORD=<secure-password>DB_NAME=merq_production
# RedisREDIS_HOST=redisREDIS_PORT=6379
# JWTJWT_SECRET=<min-32-chars-secret>
# TypesenseTYPESENSE_HOST=typesenseTYPESENSE_PORT=8108TYPESENSE_API_KEY=<api-key>Step 5: Configure Domain & SSL
Section titled “Step 5: Configure Domain & SSL”- Klik tab “Domains”
- Tambah domain:
- Backend:
api.yourdomain.com - Web:
admin.yourdomain.com
- Backend:
- Enable “Generate SSL Certificate”
- Klik “Save”
[SCREENSHOT: Domain configuration with SSL certificate option]Dokploy akan otomatis:
- Provision Let’s Encrypt SSL certificate
- Configure Caddy reverse proxy
- Setup HTTPS redirects
Step 6: First Deploy
Section titled “Step 6: First Deploy”Enable Migration & Seeding
Section titled “Enable Migration & Seeding”Untuk first deploy, enable flags ini di environment variables:
RUN_MIGRATION=trueRUN_SEEDER=trueKlik “Deploy” dan monitor logs:
[SCREENSHOT: Deploy logs showing migration and seeder success]Expected Log Output
Section titled “Expected Log Output”Starting deployment...Building Docker image...
================================== Merq Backend — Starting Up==================================
🔄 Running goose migrations... 2026/03/03 00:00:00 OK 00001_baseline.sql (123.45ms)✅ Migrations completed
🌱 Running seeders...✅ Seeders completed
🚀 Starting Merq Backend Server...==================================Server running on :8080After First Deploy
Section titled “After First Deploy”Setelah first deploy sukses, kamu bisa biarkan RUN_MIGRATION=true — goose idempotent dan akan skip jika tidak ada migration baru. Tapi untuk keamanan bisa di-disable:
RUN_MIGRATION=false # skip goose check on every startupRUN_SEEDER=false # seeders are also idempotent but disable if not neededStep 7: Verify Deployment
Section titled “Step 7: Verify Deployment”Health Check
Section titled “Health Check”curl https://api.yourdomain.com/api/healthExpected response:
{"status": "ok", "timestamp": "2026-02-21T10:00:00Z"}Web Dashboard
Section titled “Web Dashboard”- Buka
https://admin.yourdomain.com - Login dengan credentials dari seeder:
- Email:
superadmin@syskita.com - Password:
password123
- Email:
- SEGERA GANTI PASSWORD setelah login pertama!
Subsequent Deploys
Section titled “Subsequent Deploys”Dokploy otomatis deploy ketika ada push ke branch yang dikonfigurasi:
- Push ke
mainbranch - Dokploy detect changes
- Build new image
- Deploy dengan zero-downtime
Manual Deploy
Section titled “Manual Deploy”Jika perlu trigger manual:
- Buka application di Dokploy
- Klik “Redeploy”
- Pilih “Latest commit” atau “Specific commit”
Auto-Deploy Configuration
Section titled “Auto-Deploy Configuration”[SCREENSHOT: Dokploy Settings → Auto Deploy toggle]| Branch | Auto Deploy | Environment |
|---|---|---|
main | ✅ Yes | Production |
staging | ✅ Yes | Staging |
dev | ❌ No | Development |
Monitoring
Section titled “Monitoring”Built-in Monitoring
Section titled “Built-in Monitoring”Dokploy menyediakan:
- Logs: Real-time application logs
- Metrics: CPU, Memory, Network usage
- Alerts: Deployment success/failure notifications
Health Check Endpoint
Section titled “Health Check Endpoint”Backend menyediakan /api/health untuk monitoring external.
Troubleshooting
Section titled “Troubleshooting”Build Failed
Section titled “Build Failed”[SCREENSHOT: Build logs showing error]Common causes:
- Missing environment variables
- Dockerfile path incorrect
- Base image not found (
golang:1.25-alpinerequired)
Solution: Check build logs, fix errors, redeploy.
Database Connection Failed
Section titled “Database Connection Failed”Error: connection refusedSolution:
- Verify database container is running
- Check
DB_HOSTmatches container name - Verify credentials
SSL Certificate Not Generated
Section titled “SSL Certificate Not Generated”Solution:
- Verify domain DNS points to server
- Check port 80/443 are accessible
- Retry certificate generation