MitchTalmadge / AMP-dockerized

CubeCoders AMP in a Docker Image. Easily create game servers for games like Minecraft, GMod, TF2, Factorio, and StarBound!
https://hub.docker.com/r/mitchtalmadge/amp-dockerized
Other
91 stars 22 forks source link

Can't get AMP web UI to run behind traefik #139

Closed NaokiNXN closed 1 year ago

NaokiNXN commented 2 years ago

Hi trying to run this behind traefik so I can run it alongside a bunch of other things I have running on my server but can't get this to work at all.

Amp itself is working fine as can reach and access it via http://IPADDRESS:38080 (8080 already in use)

These are the traefik labels I have used as this is what I use on all the other web apps I have running, any advice or assistance would be really appreciated!!!

hostname: amp
labels:
  traefik.enable: true
  traefik.http.routers.amp-http.entrypoints: web
  traefik.http.routers.amp-http.middlewares: globalHeaders@file,redirect-to-https,gzip
  traefik.http.routers.amp-http.rule: Host(`amp.DOMAIN.com`)
  traefik.http.routers.amp-http.service: amp
  traefik.http.routers.amp.entrypoints: websecure
  traefik.http.routers.amp.middlewares: globalHeaders@file,secureHeaders@file
  traefik.http.routers.amp.rule: Host(`amp.DOMAIN.com`)
  traefik.http.routers.amp.service: amp
  traefik.http.routers.amp.tls.certresolver: cfdns
  traefik.http.routers.amp.tls.options: securetls@file
  traefik.http.services.amp.loadbalancer.server.port: 38080

Any other info needed to help figure this out please ask willl provide what I can, fairly new to using traefik so might be my stupidity causing issues.

Thanks in advance!

tobiasklemp commented 1 year ago

Hey, I run an ads instance inside docker. I dont know if you managed to solve it yourself, but i guess the instance inside docker is listening on port 8080 and you set the server port to 38080. So unless you have configured amp to change the port, this might be a problem

NaokiNXN commented 1 year ago

no ports arent the issue I have something else running over port 8080 so in the compose file ive changed the external port to 38080 so it would look like this: ports:

as mentioned can reach over http just cant get traefik to work and have tried both 38080 and 8080 cant get either to work.

tobiasklemp commented 1 year ago

yes but traefik is not attaching to the outside port as far as i understand it. I have set the server port to 8080, although this is the port of my traefik on the host side.

edit: Well as i think about it, it might be dependent on your setup. Because i have it setup that traefik is using its own network in which all containers that should be reachable through traefik are attached to. Traefik is by default attaching to the container and listening to the port that are inside the container

NaokiNXN commented 1 year ago

yeah I just removed everything and started from scratch, turns out leaving it for a good while and coming back was a good thing.

Ports and traefik were not the issue at all turns out I am just an idiot, had cloudflare pointing to the wrong IP the whole time. Thanks for the help and I apologise for being dumb!!!