I would like to put my game in Python on my website. There're so many ways to implement my idea. Finally, I decided to use GoTTY to connect to my Docker container.
Enter the container
docker exec -it [container id] sh
In the container, I executed the command like this
gotty -w -p 9998 python [your_script]
I used Caddy as my web server !!