Open et1975 opened 3 years ago
Yes, for sure. Is that all there is to it? Just base64 a docker-compose.yml, prefix with COMPOSE|
, and add it to the template in the linuxFxVersion
field?
Is there a way (and does it make sense?) to have Farmer auto-generate the compose file?
Is that all there is to it?
I don't know, I was hoping someone more familiar with appService templates could look at the template and see what else might be different
does it make sense to have Farmer auto-generate the compose file?
I think F# DSL for docker-compose would be neat, but could also be a separate lib as it would have a value on itsown.
I think making it friendly to use an externally generated docker-compose.yml would be the most immediately useful, because otherwise it's going to be almost the same work to develop and test as Container Groups. Farmer could take on the responsibility of the ARM template side of it - encoding and formatting it correctly as embedded base64. It's similar to what was added for cloud-init support on VM's, where Farmer accepts a string of cloud-config YAML and handles encoding it and including it in the template.
It doesn't seem to be well-documented from ARM perspective, but following the instructions I created the docker-compose based multi-container appService and generated the template from the resulting resource: multicontainer.json.zip.
Looking at the results
LinuxFxVersion
is what carries the base64-encodeddocker-compose.yaml
.Recreated the appService using the template and it works. What do you think, worth supporting in Farmer?