Repository navigation
Open
Description
Spinning up server's can be quite a repetitive task especialy when you have multiple servers. As someone using dokploy to manage about 6 projects, I'm proposing creating a serverless-yaml style deployment file that can be used to manage a project.
The idea is to be able to do something like dokploy deploy and it would load dokploy.yaml by default or a user can pass in a flag to specify the deployment file. Then we're able to deploy each service with convig like setting swarm mode, number of replicas, domains etc.
Proposed format
project: uber-clone-project
services:
- name: geofencer
image: ghrc.io/geofencer:latest
replicas: 2
port: 3000
domains:
- hose: geofencer.example.com
- host: example.com
path: /v1/geofencer
tls: true
redirectToHttps: true
stripPrefix: true
env:
NODE_ENV: production
API_URL: https://api.example.com
IP_ADDRESS: ${{project.IP_ADDRESS}}
resources:
cpu: 500m
memory: 512Mi
configs:
restart: unless-stopped
pullPolicy: Always
- name: backend
image: dockerub-user/backend:latest
replicas: 1
port: 8000
domains:
- host: api.example.com
path: /v1
tls: true
stripPrefix: true
env:
NODE_ENV: production
DB_URL: postgres://user:pass@db:5432/mydb
resources:
cpu: 300m
memory: 256Mi
configs:
restart: unless-stopped
pullPolicy: Always
- name: worker
image: dockerhub-user/worker:latest
replicas: 1
env:
QUEUE: jobs
CONCURRENCY: "5"
resources:
cpu: 200m
memory: 256Mi
configs:
restart: on-failurejust off the top of my head, if the project doesn't already exist, it should create a new project and use it, if project exists... it should use it.
What are your thoughts?
Metadata
Metadata
Assignees
Labels
No labels
Activity
Siumauricio commentedon Dec 8, 2025
Hey, that sounds like a good idea, but it would require quite a bit of work since a good structural design needs to be done from the beginning to prevent breaking changes. Later on, I plan to provide a dokploy.json file or something similar to define complex structures or even run bash commands.
amustapha commentedon Dec 8, 2025
Upon scratching deeper, I figured I'm able to get this to work with docker-compose.yml. I was able to build a prototype for this but it overlaps a lot wirh docker compose.
The only thing I'd want to solve for in future if i have then bandwidth is adding the domains to the domains tab when added as a traefik label. Currently unless I open the docker compose (or environment if configurable with dynamic domain) I can't recall what domain is added to which service.