Port 8008
cannot be changed apparently:
https://allegroai-trains.slack.com/archives/CTK20V944/p1592478619463200?thread_ts=1592476990.463100&cid=CTK20V944
WackyRabbit7 Thank you for the in depth answer, but as DefeatedCrab47 have noted it seems it is not fully possible yet, which is a pretty big blocker for us to integrate trains to our workflow.
SuccessfulKoala55 Great, looking forward to it!
Hey UnsightlyShark53 , you can also use a load balancer with subdomains instead of using port numbers. Instead of port 8080 use the app
subdomain, instead of port 8008 use the api
subdomain and instead of 8081 use the files
subdomain
Yep, the trains server is basically a docker-compose based service.
All you have to do is change the ports in the docker-compose.yml
file.
If you followed the instructions in the docs you should find that file in /opt/trains/docker-compose.yml
and then you will see that there are multiple services ( apiserver
, elasticsearch
, redis
etc.) and in each there might be a section called ports
which then states the mapping of the ports.
The number on the left, is the port you want to change.
So for example, if you go to the webserver
(which is the service that you interact with when you see the trains server dashboard in your browser) you'll see the ports
section has the value of "8080:80"
- this means that you will find the dashboard on port 8080
- simply change that to "8765:80"
for example, and then you will find it on port 8765
. The effect only takes change after you restart the server, to do so run the commands docker-compose -f /opt/trains/docker-compose.yml down
followed by docker-compose -f /opt/trains/docker-compose.yml up -d
. Note: You should never change the number on the right side! .
More information about ports and docker-compose can be found in https://docs.docker.com/compose/compose-file/#ports
Disclaimer - I'm not part of Allegro, just a user like you 🙂