Skip to content

Create Dokploy template for one-click deployment #29

@AbianS

Description

@AbianS

Summary

Create a Dokploy template to enable one-click deployment of Rustrak through the Dokploy platform.

Motivation

Dokploy is a popular open-source PaaS alternative to Vercel/Heroku for self-hosting. Adding a Rustrak template would:

  • Enable one-click deployment for Dokploy users
  • Increase Rustrak's visibility in the Dokploy template catalog
  • Simplify self-hosting for non-technical users
  • Join other popular tools in the Dokploy templates repository

Proposed Solution

1. Create Template Structure

Create a rustrak/ directory in the Dokploy templates repo with:

rustrak/
├── docker-compose.yml
├── template.toml
└── logo.svg (or logo.png)

2. docker-compose.yml

services:
  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: rustrak
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: rustrak
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U rustrak -d rustrak"]
      interval: 5s
      timeout: 5s
      retries: 5
    restart: unless-stopped

  server:
    image: abians7/rustrak-server:latest
    ports:
      - 8080
    environment:
      - HOST=0.0.0.0
      - PORT=8080
      - RUST_LOG=info
      - DATABASE_URL=postgres://rustrak:${POSTGRES_PASSWORD}@postgres:5432/rustrak
      - SESSION_SECRET_KEY=${SESSION_SECRET_KEY}
      - CREATE_SUPERUSER=${ADMIN_EMAIL}:${ADMIN_PASSWORD}
    depends_on:
      postgres:
        condition: service_healthy
    restart: unless-stopped

  ui:
    image: abians7/rustrak-ui:latest
    ports:
      - 3000
    environment:
      - RUSTRAK_API_URL=http://server:8080
    depends_on:
      - server
    restart: unless-stopped

volumes:
  postgres_data:

Note: No container_name or explicit networks (Dokploy handles this).

3. template.toml

[variables]
main_domain = "${domain}"
api_domain = "${domain}"
postgres_password = "${password:32}"
session_secret = "${hash:64}"
admin_email = "${email}"
admin_password = "${password:16}"

[config]
[[config.domains]]
serviceName = "ui"
port = 3000
host = "${main_domain}"
path = "/"

[[config.domains]]
serviceName = "server"
port = 8080
host = "${api_domain}"
path = "/"

env = [
    "POSTGRES_PASSWORD=${postgres_password}",
    "SESSION_SECRET_KEY=${session_secret}",
    "ADMIN_EMAIL=${admin_email}",
    "ADMIN_PASSWORD=${admin_password}"
]

4. Submit PR to Dokploy/templates

After testing locally, submit a PR to https://github.com/Dokploy/templates with:

  • Template files in rustrak/ directory
  • Entry in index.json with metadata:
{
  "id": "rustrak",
  "name": "Rustrak",
  "version": "1.0.0",
  "description": "Ultra-lightweight, self-hosted error tracking compatible with Sentry SDKs",
  "logo": "rustrak/logo.svg",
  "links": {
    "github": "https://github.com/AbianS/rustrak",
    "website": "https://abians.github.io/rustrak",
    "docs": "https://abians.github.io/rustrak"
  },
  "tags": ["monitoring", "error-tracking", "sentry", "observability"]
}

Files to Create

  • deploy/dokploy/docker-compose.yml - Dokploy-specific compose file
  • deploy/dokploy/template.toml - Dokploy configuration
  • deploy/dokploy/README.md - Instructions for submitting to Dokploy

Testing

  1. Test locally with Dokploy before submitting
  2. Verify all environment variables are properly substituted
  3. Confirm domains route correctly to UI and API
  4. Test the admin login with generated credentials

Additional Context

Available Dokploy helpers:

  • ${domain} - Random domain generation
  • ${password:length} - Random password
  • ${hash:length} - Random hash
  • ${email} - Random email
  • ${uuid} - UUID generation

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions