SemanticComputing / fuseki-docker

Apache Jena Fuseki with SeCo extensions
MIT License
33 stars 14 forks source link

Is there a way to change the port from 3030 to 443? #4

Closed n16 closed 3 years ago

n16 commented 4 years ago

I need to deploy this service on my server. My server only allows for incoming (ingress) requests to come in port 443. Can you let me know if I can change the port to 443? Changing the port using -p attribute didn't work. Thank you.

esikkala commented 4 years ago

The -p flag should do the trick. See that you have used it correctly: https://docs.docker.com/config/containers/container-networking/

n16 commented 4 years ago

Yes, @esikkala, that is when you run in using the command line. But what about if I want to embed it in the Dockerfile? What I'm trying to do is to deploy it on a host that only allows 443 for ingresses, so I need to change the listening port to be 443. I tried it in the deployment.yml K8 file, but didn't work. Do you have any solutions for that?

esikkala commented 4 years ago

If you are using Kubernetes for running this container, then you need study how the port on your server (443) is mapped to the port that is exposed inside this container (3030). It seems that you can do that with a correct combination of "port", "nodePort" and "targetPort" variables in the Kubernetes YAML file: https://matthewpalmer.net/kubernetes-app-developer/articles/kubernetes-ports-targetport-nodeport-service.html