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-failure
just 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?
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 deployand it would loaddokploy.yamlby 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
just 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?