 Podman Compose
Podman Compose
Start Kestra with a PostgreSQL database backend using Podman Compose.
Before you begin
Make sure you have already installed:
Download the Docker Compose file
Download the Docker Compose file using the following command:
curl -o docker-compose.yml \
https://raw.githubusercontent.com/kestra-io/kestra/develop/docker-compose.yml
If you don't have curl installed, you can download the Docker Compose file manually and save it as docker-compose.yml.
Podman Compose works using the provided Docker Compose file out of the box.
Launch Kestra in Root Mode
To avoid errors during the podman machine init (Error: exec: "qemu-img": executable file not found in $PATH) and during the podman machine start (Error: could not find "gvproxy"...) you should install both qemu and gvproxy before:
- with a brew install qemuon MacOS (podman comes already installed with gvproxy and virtiofsd)
- a sudo apt install qemu-utils qemu-system-x86 virtiofsdon Debian / Ubuntu
- a sudo dnf install qemu-img qemu-system-x86 podman-gvproxy virtiofsdon Fedora / CentOS / RHEL
- a sudo pacman -S qemu qemu-system-x86 virtiofsdon Arch Linux (podman comes already installed with gvproxy)
Then, you may also have to edit the ~/.config/containers/containers.conf file and add replace /path/to/bin with the result of dirname $(which gvproxy):
[engine]
helper_binaries_dir = ["/path/to/bin"]
Use the following command to create a Podman machine, start it up, and launch Kestra on it:
podman machine init --cpus 2 --rootful -v /tmp:/tmp -v $PWD:$PWD
podman machine start
podman compose up -d
# Optional steps if you have SSH related issues with `podman compose up -d`:
# podman machine inspect podman-machine-default --format '{{.SSHConfig.IdentityPath}}'
# ssh-add $(podman machine inspect podman-machine-default --format '{{.SSHConfig.IdentityPath}}')
# ssh -v -p 46719 core@127.0.0.1 echo "hello" # to accept to open a tunnel between podman and localhost
#
# Optional step if you have such an error: "Cannot connect to the Docker daemon at [path]. Is the docker daemon running?"
# export DOCKER_HOST='unix:///run/user/1000/podman/podman-machine-default-api.sock' # <= to be replaced by the above error [path]
Podman executes containers through a VM on your local machine. In order to access local volumes from your container, you need to ensure you mount these to the podman VM, hence the -v /tmp:/tmp -v $PWD:$PWD arguments.
Note: Check if you have an existing podman VM on your local machine by navigating to the 'Resources' tab in podman desktop or running the command podman machine list in your terminal. If you have an existing VM, ensure the required volumes are mounted as expected. If that does not work, you can recreate the podman VM with volumes mounted and then run Kestra.
Open the URL http://localhost:8080 in your browser to launch the UI.
Adjusting the Configuration
The command above starts a standalone server (all architecture components in one JVM).
The configuration is done inside the KESTRA_CONFIGURATION environment variable of the Kestra container. You can update the environment variable inside the Docker compose file or pass it via the Docker command line argument.
If you want to extend your Docker Compose file, modify container networking, or if you have any other issues using this Docker Compose file, check the Troubleshooting Guide.
For running Kestra with Docker Compose with each server component as a separate service, see the multi-component Docker Compose example.
Use a configuration file
If you want to use a configuration file instead of the KESTRA_CONFIGURATION environment variable to configure Kestra, you can update the default docker-compose.yml.
First, create a configuration file, for example named application.yaml, and populate with the content of the KESTRA_CONFIGURATION environment variable defined in the docker-compose.yml file.
Next, update kestra service in the docker-compose.yml file to mount this file into the container and make Kestra using it via the --config option:
# [...]
  kestra:
    image: kestra/kestra:latest
    pull_policy: always
    # Note that this is meant for development only. Refer to the documentation for production deployments of Kestra which runs without a root user.
    user: "root"
    command: server standalone --worker-thread=128 --config /etc/config/application.yaml
    volumes:
      - kestra-data:/app/storage
      - /var/run/docker.sock:/var/run/docker.sock
      - /tmp/kestra-wd:/tmp/kestra-wd
      - $PWD/application.yaml:/etc/config/application.yaml
    ports:
      - "8080:8080"
      - "8081:8081"
    depends_on:
      postgres:
        condition: service_started
Was this page helpful?
