Right now pve-compose only manages containers it created itself. If you already have LXC containers running Docker Compose stacks, there is no way to bring them under pve-compose control.
On my host I have 17 LXC containers. 10 of them run Docker Compose stacks with bind mounts pointing to app directories on the host. Only 1 has a lxc.json file (the one pve-compose created). The other 9 were set up manually or with scripts, so pve-compose ps, pve-compose doctor, and every other command just fails with "no lxc.json found".
The real data looks like this.
CTID HOSTNAME MP0 SOURCE MP0 TARGET
117 navidrome /data/app/navidrome/ /mnt/navidrome
200 immich /data/app/immich /mnt/immich
201 owncloud /data/app/nextcloud /mnt/data
203 n8n /data/app/n8n /mnt/n8n
210 gitea /data/app/gitea /mnt/gitea
212 jellyfin /mnt/pve/storage/app/jellyfin /mnt/data
241 casa360-prod /data/app/casa360/prod /mnt/prod
242 casa360-dev /data/app/casa360/dev /mnt/dev
Only speedtest has a lxc.json. The 9 others are invisible to pve-compose.
The idea is to add a command that reads the real container config from /etc/pve/lxc/<ctid>.conf and generates a valid lxc.json from it. After that, all pve-compose commands work normally.
Several edge cases already visible in the data above. CT 201 has hostname owncloud but the directory is called nextcloud. CT 212 uses a completely different storage path. CT 117 has a trailing slash in the mount source. CT 241 and 242 live in nested subdirectories.
Right now pve-compose only manages containers it created itself. If you already have LXC containers running Docker Compose stacks, there is no way to bring them under pve-compose control.
On my host I have 17 LXC containers. 10 of them run Docker Compose stacks with bind mounts pointing to app directories on the host. Only 1 has a
lxc.jsonfile (the one pve-compose created). The other 9 were set up manually or with scripts, sopve-compose ps,pve-compose doctor, and every other command just fails with "no lxc.json found".The real data looks like this.
Only
speedtesthas alxc.json. The 9 others are invisible to pve-compose.The idea is to add a command that reads the real container config from
/etc/pve/lxc/<ctid>.confand generates a validlxc.jsonfrom it. After that, all pve-compose commands work normally.Several edge cases already visible in the data above. CT 201 has hostname
owncloudbut the directory is callednextcloud. CT 212 uses a completely different storage path. CT 117 has a trailing slash in the mount source. CT 241 and 242 live in nested subdirectories.