Skip to content

Automatic Deletion Service for Closed Application Instances in a Linux Environment

Notifications You must be signed in to change notification settings

AleximusOn/PullsRemoverService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PullsRemoverService

Service for automatically deleting closed application instances in a Linux environment using Node.js.

Installation and Usage

  1. Clone the repository:
git clone https://github.com/deimosowen/PullsRemoverService.git
  1. Navigate to the project directory:
cd PullsRemoverService
  1. Install dependencies:
npm install
  1. Set environment variables using one of the following methods:
  • Create a .env file and add the following variables with the appropriate values:
GETHUBTOKEN=your_github_token
REPOSITORY=your_repository
OWNER=your_username
DEPLOYLABEL=deploy
NOTDELETELABEL=do_not_delete
DEPLOYFOLDER=deploy_folder
PULLPREFIX=pull
NGINXCONTAINERNAME=nginx_container_name
NGINXCONFIGFOLDER=nginx_config_folder
  • Or set environment variables directly before running the service:
export GETHUBTOKEN=your_github_token
export REPOSITORY=your_repository
export OWNER=your_username
export DEPLOYLABEL=deploy
export NOTDELETELABEL=do_not_delete
export DEPLOYFOLDER=deploy_folder
export PULLPREFIX=pull
export NGINXCONTAINERNAME=nginx_container_name
export NGINXCONFIGFOLDER=nginx_config_folder
  1. Start the service:
npm start

Note: Environment variables can be set either using the .env file or directly via the export command. Choose the method that is most convenient for you.

Configuration

The following configuration variables are used in the project:

  • GETHUBTOKEN: Your GitHub token for API access.
  • REPOSITORY: The repository name that the service works with.
  • OWNER: The username or organization that owns the repository.
  • DEPLOYLABEL: The label used to mark deployed applications.
  • NOTDELETELABEL: The label used to mark applications that should not be deleted.
  • DEPLOYFOLDER: The folder for deploying applications.
  • PULLPREFIX: The prefix used for naming folders during deployment.
  • NGINXCONTAINERNAME: The Nginx container name.
  • NGINXCONFIGFOLDER: The path to the Nginx configuration files folder. All variables are loaded from the .env file or set directly via the export command and are available through the process.env object.

About

Automatic Deletion Service for Closed Application Instances in a Linux Environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published