Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Docker Setup Instructions

Matt Czyr edited this page Mar 11, 2021 · 8 revisions

Setting up Shuttle Tracker with Docker

Installing Docker

macOS/Windows

Download and install Docker Desktop for macOS or Docker Desktop for Windows. Once installed, you must launch the Docker Desktop app in order to use Docker via the terminal. Docker is now fully setup and ready to use!

Linux

Open a new terminal session. Run the following command to install Docker:

curl -fsSL get.docker.com | sudo sh

Once installed, run the following command to enable Docker under your user account:

sudo usermod -aG docker $USER

After enabling your user account, logout and log back in for the changes to take affect. Then run the following command to install Docker Compose:

sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose

Docker is now fully setup and ready to use!

Installing Postgres

Important Note: Postgres must be run through a terminal session, i.e. not through a graphical application that runs Postgres on its own. Otherwise, Docker will be unable to connect to the Postgres server.

If you don't have Postgres installed, see the readme at the root of the Shuttle Tracker directory for instructions on how to install it.

  • For Linux/WSL users, see instructions 3-4.
  • For macOS users, see instruction 3.
  • For Windows users, see instruction 6.

Installing Shuttle Tracker with Docker

  1. Clone or download the Shuttle Tracker repository to your local machine
  2. Be sure Docker Desktop is open so that you have access to Docker commands via the terminal.
  3. Open a new terminal session and navigate to the Shuttle Tracker root directory
  4. Run the following command to download Shuttle Tracker dependencies and compile files:
docker build -t shuttletracker .
  1. Run the following command to start Shuttle Tracker:
docker run shuttletracker

Troubleshooting

  • If Docker is having trouble connecting to the Postgres database, try using host.docker.internal instead of localhost in the Postgres URL in conf.json.
  • If your browser is unable to find the server when navigating to localhost:8080, try starting Shuttle Tracker with docker run -p 8080:8080 shuttletracker.
  • If your browser indicates that the connection was unexpectedly dropped when navigating to localhost:8080, try using 0.0.0.0:8080 instead of localhost:8080 for the listen URL in the config file.
  • If changes to conf.json are not reflected in the application's configuration, don't forget to rebuild the project.