Skip to content

Setup Central Server with Docker

hammy275 edited this page Jun 9, 2024 · 2 revisions

Setup with Docker

comp-status consists of 3 parts, central-server, the server that processes all computer resource information and distributes it, servers, the computers that send their resource information to central-server, and clients that access the data.

This page details setting up both a central-server and server simultaneously using Docker Compose.

Limitations

Before setting up with Docker, please note the following limitations in comparison to running without Docker:

  • Computers that you are retrieving the status of will provide invalid data if that computer is using Docker UNLESS the computer is running Linux and the computer is not using Docker Desktop.

Setup

  1. Download the repository using git clone https://github.com/hammy275/comp-status inside the folder where you want to store the central-server files
  2. Port forward the port you would like to host the server on.
  3. If using Let's Encrypt, follow the instructions using Certbot to get a certificate.
  4. In the central-server folder, create an empty text file named db.json.
  5. In the server folder, copy settings_docker.json into the same folder with the name settings.json.
  6. In the settings.json file, replace YOUR_USERNAME_HERE and YOUR_PASSWORD_HERE_THAT_WILL_BE_REMOVED_AFTER_SUCCESSFUL_AUTHENTICATION with a username and password. Remember these for later.
  7. From the root directory of this repository, run docker compose up -d.
  8. Visit http://localhost:5000 in your web browser of choice. From here, log in with the username fts_user and the password shown in the central-server logs. These logs can be viewed by running the command docker logs -f comp-status-central-server.
  9. Go to the first time setup page at the top, then proceed with first time setup. Do not change the port from 5000 to another number.
  10. Log in with the user account you created during first time setup, and create another user account with the "New User can Send Computer Info" permission enabled. The username and password for this new account should be the same as you set in step 6.
  11. Restart the server container using docker start comp-status-server.
  12. You should be good! If all went well, you can visit http://localhost:5000 in your web browser, log in with the user account you made during first-time setup in step 9, then see the status of said computer.
Clone this wiki locally