Hi, first post
I’ve been fiddling with trying to get a docker-compose driven project running via Balena to see if the tools Balena provides are sufficient for the needs for the project along with other future projects (Deploying via web is so cool! Hope I can make it work). For this project in particular, I’m attempting to convert a docker compose file from v3 to the subset of v2 that balena supports.
I’ve been running into a lot of issues with getting my docker-compose.yml file accepted due to the limited subset of features supported by balena. Some of them I’ve been able to program around via manual pre-build scripts, but others I’m not sure about… largely due to my unfamiliarity with docker but even after poring over the docker and balena docks there are still things I need clarified.
For reference, here’s a link to the file as is, which to the best of my interpretation of the docs should work but does not: https://github.com/jcwilk/funkwhale_rpi_compose/blob/027104e241bbe917685cc0079ea11d64c167a459/docker-compose.yml (the branch is currently figuring_out_bind_mounts_error but just use that ref just in case)
It fails with:
$ git push balena master:master --force Enumerating objects: 40, done. Counting objects: 100% (40/40), done. Delta compression using up to 2 threads Compressing objects: 100% (39/39), done. Writing objects: 100% (40/40), 10.64 KiB | 990.00 KiB/s, done. Total 40 (delta 19), reused 0 (delta 0) [Error] Could not parse compose file [Error] Bind mounts are not allowed [Error] Not deploying release. remote: error: hook declined to update refs/heads/master To git.balena-cloud.com:xoxovault/funkwhale.git ! [remote rejected] master -> master (hook declined) error: failed to push some refs to 'firstname.lastname@example.org:xoxovault/funkwhale.git'
As best I can tell, the “bind mount points” are the volume definitions? According to the balena docs https://www.balena.io/docs/reference/supervisor/docker-compose/ volumes is supported but you must use short form and name reference “Only support short syntax and named volumes.” so I converted my volumes to be top-level named as per https://docs.docker.com/compose/compose-file/compose-file-v2/#volume-configuration-reference but the error still persists.
Am I interpreting this wrong or is it something else? The error is very unhelpful, it should specify the path in the config or the line number or something to make it clearer what is causing the issue.
Also, I’d like to include an nginx template but I’m not sure how to pass it in without something like:
nginx: volumes: - "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
but I’m guessing that isn’t a supported volume type? Are we not allowed to use predefined services and templates at the same time or is there a right way to do this?