Skip to content

Commit

Permalink
Add install and deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangeyo committed Aug 12, 2024
1 parent e86e91a commit bf50a21
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SyntaxSorcerer Project

## Installation

This project contains scripts for managing the frontend and server components of the SyntaxSorcerer application. The scripts cover:

1. Installing NPM dependencies.
2. Deploying to Fly.io.
3. A combined script to execute both tasks sequentially.


## Scripts

### 1. `npm_install.sh`

**Description**: This script installs NPM dependencies for both the `frontend` and `server` components.

### 2. `fly_deploy.sh`

**Description**: This script deploys both the `frontend` and `server` components to `Fly.io.`

### 3. `run_all_tasks.sh`

**Description**: This script performs both the `NPM installation` and `Fly.io deployment` tasks sequentially. It installs dependencies for both frontend and server, then deploys them.

### **Usage**:
1. Open your terminal.
2. Navigate to the `scripts` directory:

```bash
cd SyntaxSorcerer/scripts
```
3. Make scripts in this directory executable.
```bash
chmod +x *.sh
```
4. Execute your desired script.
```bash
./npm_install.sh
```
12 changes: 12 additions & 0 deletions scripts/fly_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash


cd ../frontend
fly deploy


cd ../server
fly deploy


echo "Deployment complete. Have a good day! :)"
12 changes: 12 additions & 0 deletions scripts/npm_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash


cd ../frontend
npm install


cd ../server
npm install


echo "NPM INSTALL COMPLETE. :)"
6 changes: 6 additions & 0 deletions scripts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions scripts/run_all_tasks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash


cd ../frontend
npm install


cd ../server
npm install


cd ../frontend
fly deploy


cd ../server
fly deploy


echo "All tasks complete. Have a good day! :)"

0 comments on commit bf50a21

Please sign in to comment.