Skip to content

Dokploy Deployment

Dokploy provides automated deployment dengan reverse proxy, SSL, dan monitoring built-in.

  • Server dengan Docker installed
  • Domain name pointed ke server IP
  • Dokploy installed di server (dokploy.com for setup)
  1. Login ke Dokploy dashboard
  2. Klik “New Application”
  3. Pilih “Compose” atau “Application”
[SCREENSHOT: Dokploy dashboard showing New Application button]
  1. Pilih GitHub sebagai Git provider
  2. Authorize Dokploy untuk akses repository
  3. Pilih repository merq dari list
[SCREENSHOT: Git provider selection showing GitHub option]
SettingValue
Namemerq-backend
RepositorySyskita/merq
Branchmain
Build TypeDockerfile
Dockerfile Pathmerq-backend/Dockerfile
Build Contextmerq-backend
[SCREENSHOT: Build configuration form for backend]
SettingValue
Namemerq-web
RepositorySyskita/merq
Branchmain
Build TypeNixpacks atau custom Dockerfile
Build Contextmerq-web

Klik tab “Environment” dan masukkan semua variables:

[SCREENSHOT: Environment variables UI showing variable input form]

Lihat Environment Variables Reference untuk daftar lengkap.

Terminal window
# Database
DB_HOST=postgres
DB_PORT=5432
DB_USER=merq
DB_PASSWORD=<secure-password>
DB_NAME=merq_production
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
# JWT
JWT_SECRET=<min-32-chars-secret>
# Typesense
TYPESENSE_HOST=typesense
TYPESENSE_PORT=8108
TYPESENSE_API_KEY=<api-key>
  1. Klik tab “Domains”
  2. Tambah domain:
    • Backend: api.yourdomain.com
    • Web: admin.yourdomain.com
  3. Enable “Generate SSL Certificate”
  4. 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

Untuk first deploy, enable flags ini di environment variables:

Terminal window
RUN_MIGRATION=true
RUN_SEEDER=true

Klik “Deploy” dan monitor logs:

[SCREENSHOT: Deploy logs showing migration and seeder success]
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 :8080

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:

Terminal window
RUN_MIGRATION=false # skip goose check on every startup
RUN_SEEDER=false # seeders are also idempotent but disable if not needed
Terminal window
curl https://api.yourdomain.com/api/health

Expected response:

{"status": "ok", "timestamp": "2026-02-21T10:00:00Z"}
  1. Buka https://admin.yourdomain.com
  2. Login dengan credentials dari seeder:
    • Email: superadmin@syskita.com
    • Password: password123
  3. SEGERA GANTI PASSWORD setelah login pertama!

Dokploy otomatis deploy ketika ada push ke branch yang dikonfigurasi:

  1. Push ke main branch
  2. Dokploy detect changes
  3. Build new image
  4. Deploy dengan zero-downtime

Jika perlu trigger manual:

  1. Buka application di Dokploy
  2. Klik “Redeploy”
  3. Pilih “Latest commit” atau “Specific commit”
[SCREENSHOT: Dokploy Settings → Auto Deploy toggle]
BranchAuto DeployEnvironment
main✅ YesProduction
staging✅ YesStaging
dev❌ NoDevelopment

Dokploy menyediakan:

  • Logs: Real-time application logs
  • Metrics: CPU, Memory, Network usage
  • Alerts: Deployment success/failure notifications

Backend menyediakan /api/health untuk monitoring external.

[SCREENSHOT: Build logs showing error]

Common causes:

  • Missing environment variables
  • Dockerfile path incorrect
  • Base image not found (golang:1.25-alpine required)

Solution: Check build logs, fix errors, redeploy.

Error: connection refused

Solution:

  1. Verify database container is running
  2. Check DB_HOST matches container name
  3. Verify credentials

Solution:

  1. Verify domain DNS points to server
  2. Check port 80/443 are accessible
  3. Retry certificate generation