farmer icon indicating copy to clipboard operation
farmer copied to clipboard

Multi-container AppService

Open et1975 opened this issue 2 years ago • 4 comments

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-encoded docker-compose.yaml.

Recreated the appService using the template and it works. What do you think, worth supporting in Farmer?

et1975 avatar Jul 08 '21 18:07 et1975

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?

ninjarobot avatar Jul 10 '21 21:07 ninjarobot

Is there a way (and does it make sense?) to have Farmer auto-generate the compose file?

isaacabraham avatar Jul 26 '21 08:07 isaacabraham

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.

et1975 avatar Jul 26 '21 13:07 et1975

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.

ninjarobot avatar Jul 28 '21 04:07 ninjarobot