benfl3713 / DepartureBoard

🚅 This Project allows a user to view live train times in the format of a station departure board
https://www.leddepartureboard.com
Apache License 2.0
27 stars 1 forks source link

Site launches locally from docker-compose.yml but doesn't fetch any results #295

Closed magammon closed 7 months ago

magammon commented 7 months ago

Describe the bug I have had no luck in hosting the site locally using the docker-compose.yml in the repository so I wrote my own. This service launches correctly but does not fetch any departures. I wonder if i have entered the RTT key in the wrong format. they have provided username and password as opposed to a single access key and I do not know how to format the key correctly. I have provided my RTT API password but this does not seem to work

To Reproduce Steps to reproduce the behavior:

  1. run docker-compose up -d using docker-compose.yml attached
  2. Navigate to http://IPofcontainerserver:9005/KYN

Expected behaviour See the departure boards for Keynsham.

Actual behaviour 'No Departures found for KYN' message shown

Further steps taken I have used the container terminal to identify that there is a file /config.xml that despite me having the token in the docker-compose file did not have the key in. I have updated this file to <Config><RealTimeTrainsToken>realtimetrainsapipassword here</RealTimeTrainsToken></Config>

Screenshots Screenshot 2024-02-09 at 12 39 20 Screenshot 2024-02-09 at 12 39 27

Additional context

version: '3'

services:
  departure-board:
    container_name: ledboard
    image: benfl3713/departure-board:latest
    environment:
      - RealTimeTrainsToken=c675fe6045a96etttttt8d66fc1ac1df4d47e4ee
    ports:
      - `"9005:80"
benfl3713 commented 7 months ago

Hi @magammon

Great to see your trying to run this from docker.

Real Times trains changed the way they provide you credentials by giving you a username and password instead of a token.

Luckily you can convert your username/password into a token using the following website https://www.base64encode.org/

In the top box simply insert the following <username>:<password> note the colon in the middle is necessary. Then press encode which should give you back some text which will be your token.

Let me know if you have any issues

magammon commented 7 months ago

Thanks so much but i still cannot get it to work. I'm going to take a break for a bit and come back in a couple on months. Thanks.

magammon commented 5 months ago

Hi @benfl3713 - just to let you know that if i run the container using docker (as opposed to docker-compose) it works just fine so it must be a problem with my compose file. Will take a look at my compose file and let you know. Thanks for your help - should have tried this before.