Incus-compose 1.0 has been released

A problem is, it seeds only the first time. That is might not what you expect.

EDIT: A workaround,

  • Seed the volume incus-compose up
  • Use some fs watcher to watch your fs for changes
  • One change incus-compose down --no-deps <service>, incus-compose incus storage volume rm default vol-seed-XXXXX, incus-compose up

Can you run a standalone javascript file on your OS?

I would write one that seeds your volume on demand with optional restart.


I thought again about this, I’ll implement this feature differently than docker.

incus-compose watch --restart service1 --restart service2

This will watch all seeded bind files/directories upload and restart service1/service2 on demand, other services will get updates as well but wont be restarted.

What do you think @tort ?

good to know I gave you food for thought

i think the cli option route is good but the power of compose comes from the life cycle being explicit in yaml that’s why the watch in yaml is a good idea. for ex right now I am trying to send traefik/caddy routes as files. I will do this often so having it in yaml is useful. I expect it to push and erase the old file (sync) on every compose up and for it to ne picked up by traefik without having to stop the container.

what do you think?

Thanks, yes you gave me thinking food :slight_smile:

up will sync on each run with Implement a `watch` command · Issue #73 · lxc/incus-compose · GitHub

The watch command is for developers than run something like devcontainers.

I’m working with the Maintainer / Developer of dnsweaver for first class incus and incus-compose support.

The goal is to have a proxy like caddy/traefik, dnsweaver and incus work together - you start a compose project - you have a service online.

I think a lot people will have fun with such a solution.

Well dnsweaver is not rely needed for compose hosting but its a nice to have.

1 Like

Or you can use buildah, which I believe is what underlies podman build.

I thought about this as well, buildah is heavy dependency and maybe hard to maintain while installing podman is easy and doesn’t conflict with anything.

What do you think?

Btw. on a fresh trixie container I have to do this to make podman work:

mkdir -p ~/.config/containers/
echo -e '[engine]\ncgroup_manager = "cgroupfs"' > ~/.config/containers/containers.conf
loginctl enable-linger runner
# reboot the container

I guessed that installing buildah would be a less heavy dependency than podman, since it does fewer things.

But I suppose they’re both going to require some sort of container runtime for any RUN statements in the Dockerfile. AFAICS buildah depends on runc, but podman depends on runc too.

I don’t know why buildah would be any harder to install or have more potential conflicts than podman - as far as I can see it’s packaged conveniently.

If someone wants to write an incus-build they could do that :slight_smile: Probably by borrowing code from buildah, which is what podman-build did.

I think we are talking about 2 different things - having buildah as a library part of of incus-compose or as an external dependency.

For the second, that is maybe simple - just switch the binary name in code and go.

I’ll think about this.

This is what I do internally for anyone looking into building a standalone solution:

nitpicking here idk your stance on keeping close to the compose spec but in theory watch anchors only activate on compose up –watch

I also noticed that incus-compose up acts like an implicit -d option instead being a foreground process that destroys the stack on CTRL+c

1 Like

I wish incus-compose to be a drop-in for docker compose, so yes your arguments aren’t “nitpicking”.

Based on your feedback @tort I’m gonna close the issue and implement up --watch, thank you.

As I’m not using incus-compose up as a service and I always disliked the -d I didn’t implement the no-detach default yet.

In scripts please always use incus-compose up --detach the no-detach default will follow.

2 Likes