Skip to content

tranade/srt-backend

 
 

Repository files navigation

SRT Backend

Description

This service is meant to be run on the computer that is connected to the SRT telescope at Johns Hopkins University. In order for the user requests from the accompanying website to be fulfilled, this service must be running. The website will remain operational even if this service is not running, but the user requests will not be fulfilled and users, will be waiting for email with their results that will not come.

Installation and Setup

  1. Install Python 3.10 or higher
  2. Install pip
  3. Run the following command to create a venv: python3 -m venv venv
  4. Activate the venv: source venv/bin/activate
  5. Install the requirements: pip install -r requirements.txt
  6. Create a .env file and copy the values from the .env.example file. This a hidden file as it starts with a '.' so run ls -a to see it in the file tree.
  7. Populate the .env file with the correct values
  8. Test the service runs correctly: python3 main.py
  9. Now that the service is running correctly we need to setup the service to run in the background. Please close the running service.
  10. Run the service in the background: nohup python3 main.py &

Usage

NOTE: If the computer has been shut down or the service has been stopped and has been previously setup, then the following steps are all that is needed to run the service:

  1. Additionally, please make sure the the .env file for the repo is properly populated containing the the right values. This a hidden file as it starts with a '.' so run ls -a to see if it exists.
  2. Activate the venv: source venv/bin/activate
  3. Test the services still runs correctly: python3 main.py
  4. Now that the service is running correctly we need to setup the service to run in the background. Please close the running service.
  5. Run the service in the background: nohup python3 main.py &
  6. To stop the service you will need to run ps aux | grep main.py to get the pid of the process running
  7. Then simply run kill <pid you found>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%