Docker Container, redirect?

Sorry that I never really got around to writing things up! The short one that I can do right now is

  1. make a unique URL for the docker thing—maybe theres a way to do subdomains, idk, but anyhow thing.domain.com. make it have a https. so https://thing.domain.tld

  2. go to portainer. depending if you have a stack or a single container (prob the latter) go to that and click add stack or add container.

  3. fill out deets as needed. for stack, your compose file, for container your name (thing here) and image from docker hub. click publish all ports

You’ll have to look at an individual container to see what port they publish on. sometimes it’s like a random number that wont conflict with your YNH setup, but if it’s like 80 or 25 you need to change it with “port mapping” so like 9283:80

image

  1. I did a lot of tinkering of where the volume went but I don’t think any of it was needed, portainer and YNH should take care of that. volume is where on your server it goes. i cant give advice

  2. deploy container

6, go back to ynh. install the redirect app on whatever domain you set for this

  1. fill it out like this

  2. cross your fingers and hope it works. sometimes things do, sometimes they just don’t work. try googling around if not, with errors from the docker logs. sometimes env tweaking fixes it sometimes not. I don’t know enough to give advice why

2 Likes