i’m new to Caddy and im wondering if it is possible to run a mysql docker container behind Caddy and access it from another computer with the public ip address and the port 3306?
Caddy is an HTTP server. MySQL communicates over TCP. So no, not with vanilla Caddy.
But, you can use caddy-l4 which is a plugin that adds TCP/UDP proxy support to Caddy. Unfortunately, it currently only supports JSON config, no Caddyfile.
Be very careful about exposing your MySQL database though. That’s very dangerous unless you’ve taken the appropriate steps to lock it down from being reachable by bad actors.