docs
docs copied to clipboard
Add Guide to install Kestra with Coolify and/or Dokploy
Describe what's missing in our docs
Several services make the life of a developer (who isn't a pro in DevOps) much more manageable, simplifying self-host a lot. Coolify is among the most popular. Dokploy is newer but also gained some traction. https://coolify.io - "An open-source & self-hostable Heroku / Netlify / Vercel alternative." https://dokploy.com - "free alternative self-hostable solution to platforms like Heroku, Vercel, and Netlify" They allow to use Docker Compose directly or as the predefined "App" Templates. Would be great to have a guide to install Kestra in these services. (or even better - to have app template)
PRs made!
https://github.com/coollabsio/coolify/pull/5518 https://github.com/Dokploy/templates/pull/58
Trying again: https://github.com/coollabsio/coolify/pull/5527 and https://github.com/coollabsio/coolify/pull/5528
As I wrote in slack thread:
Thanks! But it's a bit more work than using sample docker compose. I've tried it and it's not working.
ok, I've tried recent version on Dokploy:
volumes:
postgres-data:
driver: local
kestra-data:
driver: local
services:
postgres:
image: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: kestra
POSTGRES_USER: kestra
POSTGRES_PASSWORD: k3str4
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 30s
timeout: 10s
retries: 10
kestra:
image: kestra/kestra:latest
pull_policy: always
# Note that this setup with a root user is intended for development purpose.
# Our base image runs without root, but the Docker Compose implementation needs root to access the Docker socket
# To run Kestra in a rootless mode in production, see: https://kestra.io/docs/installation/podman-compose
user: "root"
command: server standalone
volumes:
- kestra-data:/app/storage
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/kestra-wd:/tmp/kestra-wd
environment:
KESTRA_CONFIGURATION: |
datasources:
postgres:
url: jdbc:postgresql://postgres:5432/kestra
driverClassName: org.postgresql.Driver
username: kestra
password: k3str4
kestra:
server:
basicAuth:
enabled: false
username: "[email protected]"
password: passpass
repository:
type: postgres
storage:
type: local
local:
basePath: "/app/storage"
queue:
type: postgres
tasks:
tmpDir:
path: /tmp/kestra-wd/tmp
url: http://localhost:8080/
ports:
- "8080"
- "8081"
depends_on:
postgres:
condition: service_started
It did built deploy, no errors, then I added domain (autogenerated), set it to kestra container, 8080 port, but it didn't showed anything. "page not found". Then I tried to redeploy and kestra container only shows error from now on:
Message: Failed to initialize pool: The connection attempt failed.
04/03/25, 05:24:10 PM
info
Path Taken: DatasourceFactory.dataSource(DatasourceConfiguration datasourceConfiguration)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2349)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2304)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2316)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.DefaultBeanContext.createRegistration(DefaultBeanContext.java:3127)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.SingletonScope.getOrCreate(SingletonScope.java:80)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.DefaultBeanContext.findOrCreateSingletonBeanRegistration(DefaultBeanContext.java:3029)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.DefaultBeanContext.initializeEagerBean(DefaultBeanContext.java:2693)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1994)
04/03/25, 05:24:10 PM
info
... 7 more
04/03/25, 05:24:10 PM
error
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The connection attempt failed.
04/03/25, 05:24:10 PM
info
at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:602)
04/03/25, 05:24:10 PM
info
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:589)
04/03/25, 05:24:10 PM
info
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:99)
04/03/25, 05:24:10 PM
info
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:80)
04/03/25, 05:24:10 PM
info
at io.micronaut.configuration.jdbc.hikari.HikariUrlDataSource.<init>(HikariUrlDataSource.java:35)
04/03/25, 05:24:10 PM
info
at io.micronaut.configuration.jdbc.hikari.DatasourceFactory.dataSource(DatasourceFactory.java:69)
04/03/25, 05:24:10 PM
info
at io.micronaut.configuration.jdbc.hikari.$DatasourceFactory$DataSource0$Definition.instantiate(Unknown Source)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.BeanDefinitionDelegate.instantiate(BeanDefinitionDelegate.java:170)
04/03/25, 05:24:10 PM
info
at io.micronaut.context.DefaultBeanContext.resolveByBeanFactory(DefaultBeanContext.java:2334)
Also interested in Coolify deployment. Any updates?
Here's a compose file that works on Coolify (self-hosted, with tailscale on the host for networking).
volumes:
postgres-data:
driver: local
kestra-data:
driver: local
services:
postgres:
image: postgres
volumes:
- 'postgres-data:/var/lib/postgresql/data'
environment:
POSTGRES_DB: kestra
POSTGRES_USER: kestra
POSTGRES_PASSWORD: k3str4
healthcheck:
test:
- CMD-SHELL
- 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}'
interval: 30s
timeout: 10s
retries: 10
kestra:
image: 'kestra/kestra:develop'
pull_policy: always
user: root
command: 'server standalone'
volumes:
- 'kestra-data:/app/storage'
- '/var/run/docker.sock:/var/run/docker.sock'
- '/tmp/kestra-wd:/tmp/kestra-wd'
environment:
KESTRA_CONFIGURATION: |
datasources:
postgres:
url: jdbc:postgresql://postgres:5432/kestra
driverClassName: org.postgresql.Driver
username: kestra
password: k3str4
kestra:
# server:
# basicAuth:
# username: [email protected] # it must be a valid email address
# password: Admin1234 # it must be at least 8 characters long with uppercase letter and a number
repository:
type: postgres
storage:
type: local
local:
basePath: "/app/storage"
queue:
type: postgres
tasks:
tmpDir:
path: /tmp/kestra-wd/tmp
url: http://localhost:7000/
ports:
- '7000:8080'
- '8081:8081'
depends_on:
postgres:
condition: service_started
As far as I can tell, I only mapped a custom port (7000) since 8080 will have all kinds of issues with things trying to use that port on the host.