FreeTAKTeam / FreeTAKServer-Docker

Official Docker Image for FreeTAKServer
Eclipse Public License 2.0
42 stars 26 forks source link

Question: How to run FTS-docker without fixed IPs #25

Closed sgofferj closed 3 years ago

sgofferj commented 3 years ago

I have been trying the lats 2 or so hours to get the dev tagged version to run inside it's own docker network with mapped ports. However, I was very unsuccessful. I could only get one part running at any time. If I would e.g. put 0.0.0.0 in the IP envvar, the container would run but the WEB UI would not connect. If I would put the actual server IP in the envvar, the UI would fail to run with "cannot assign requested address" in the logs. I'm also having issues to grasp which ports are for what and if I need to map all of them. In general, I'd like to only use encrypted connections. Ideally, everything would go through my reverse proxy, because the server has a LAN IP and traffic from outside would be port-forwarded by the firewall, so different IP for clients outside the LAN. The final goal is to run FTS on docker behind a Traefik reverse proxy/loadbalancer. I would redirect the WEB UI at port 5000 to some fts-ui.domain.com and let Traefik worry about the TLS. How would I run FTS with the UI inside a docker network so that the UI can talk to the API

LargoUsagi commented 3 years ago

The current dev tag is not considered functional and there are broken PR's attempting to fix it.

If you are not attempting to run this on a raspberry pi you could pull the main branch and build the dockerfile in its current state as the build failure is related to multi architectural builds.

sgofferj commented 3 years ago

Oh, thanks. No, I'm running on x86_64.Problem is, the 1.75 tag doesn't start at all for me, same issue as in #12 . I'll try following the fix in that issue then for the moment and try 1.75.

sgofferj commented 3 years ago

Ok, building the main branch and running it seems to work basically. I noticed one issue immediately: The webmap doesn't show. The iframe contains "Not found". I checked the page code and noticed that the iframe references http://serverip:8000/tak-map. However, the port 8000 is not mentioned in the docs nor is it exposed in the Dockerfile. I can't tell if that's a bug in the docker branch or in the server branch...

sgofferj commented 3 years ago

Never mind, I noticed that the map is external.

sgofferj commented 3 years ago

Solved. The various IP environment variables actually accept FQDNs.