Noob questions for caddy docker

You can indeed connect single files, but there’s one quirk about it you should know. You might be familiar with the way that Docker will CREATE a folder on the host if you specify a volume mount that doesn’t exist on the host yet.

Well, since Docker has no way to tell whether you meant to mount a file or a folder, it will always assume it’s meant to be a folder, UNLESS the file already exists on the host. If that file isn’t there when you first run the container, it might cause problems if the container really expects it to be a file and not a folder.

TL;DR: Yeah you can mount files, but make sure they exist on the host before you run your container.

Yeah, that’s correct.

Well… sort of. It’s… doable. I’d recommend against it unless you’re willing to muck around with it for a number of hours and maybe end up not achieving what you’re after. If you just want your service up and running, just do a subdomain. Forewarning aside, take a look at http.filter and this thread.

Yep! Something like this:

http://url1.example.com {
  proxy / 192.168.100.44:8020
}
http://url2.example.com {
  proxy / 192.168.100.44:8030
}

Remove the http:// part when you’re ready for Caddy to grab certificates for them.

As long as they’re from a previous Caddy setup, sure. Caddy lays out its ACME directory and certificates in a certain manner, so if you’ve got certificates from elsewhere, it’s much simpler just to let Caddy get new ones.

What I’m seeing here is that php-fpm7 is being run twice, and one of them is exiting. That’s good, you only want one php-fpm7. I’d say that’s fine, unless you’re experiencing any other issues with the web server.