Create an A Record for sub.example.com with the IP address where You host forum
Then in nginx proxy,
use server_name sub.example.com;
And forward all requests to docker container running discourse.
Create an A Record for sub.example.com with the IP address where You host forum
Then in nginx proxy,
use server_name sub.example.com;
And forward all requests to docker container running discourse.