A command-line tool designed to manage and operate NU Sci services seamlessly.
![Screenshot 2024-10-03 at 11 33 54 PM](https://private-user-images.githubusercontent.com/41793762/373488227-063902a5-8489-4d5c-9cfc-b91cabcc8202.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODcyOTIsIm5iZiI6MTczOTM4Njk5MiwicGF0aCI6Ii80MTc5Mzc2Mi8zNzM0ODgyMjctMDYzOTAyYTUtODQ4OS00ZDVjLTljZmMtYjkxY2FiY2M4MjAyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE5MDMxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkYTE4MDFmY2NlOGMwNzhiY2Y4MDhiYzAxYTBiYzU3NTkzNDFiNTA0MmUzNzYxNzkyMTliMzYwNGE5OGVhYTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.5sVNGRD3HjzyFtCDZxyguYF2SHZRrj4rebi5Cy2Uo7o)
- Unified Docker Management
- Build and manage Docker containers effortlessly within a single Docker Compose project using simple commands.
- Automatic
.env
Distribution- Automatically distribute and manage
.env
files across multiple repositories.
- Automatically distribute and manage
- Flexible Environment Switching
- Switch between various Docker environments, including
testing
,connected
,remote
, and more, with ease.
- Switch between various Docker environments, including
- Service Status Visualization
- Get a clear view of the status of all linked services.
- Clone this repository to your local filesystem:
git clone https://github.com/Northeastern-Science-Magazine/nu-cli.git
- Add the master
.env
file to the root directory. - Navigate to the root directory where the repository was cloned and run the following commands:
npm install npm link
- Ensure the target repository contains a
nucli.config.json
file at the root, defining the relevant service configuration. - From the root directory of the target repository, link the service to the CLI by running:
nucli link
- While you can directly run
nucli env <environment> [database]
, runningnucli link
first is recommended for an optimal setup.
- While you can directly run
- A
.env
file will be automatically generated in the root directory. This file is created bynu-cli
. - The corresponding Docker Compose project for the service’s container(s) will be set up automatically.
- To switch the service's environment, use:
nucli env <environment> [database]
- To remove the Docker Compose project, simply run:
nucli unlink
nucli link
: Links the current repository to the CLI, setting up the necessary environment files and Docker configuration.nucli unlink
: Removes the linked Docker Compose project, undoing the environment setup.nucli env <environment> [database]
: Switches the service’s environment and optionally specifies the database.nucli status
: Displays the status of all linked services.
- Backend Service Environments:
testing
connected
- Optional Database Configuration:
- Leave empty for local database.
- Specify
remote
for remote database connections.