Skip to content

Commit

Permalink
Merge pull request #46 from brianwalborn/develop
Browse files Browse the repository at this point in the history
Merge develop into main
  • Loading branch information
brianwalborn authored Mar 16, 2022
2 parents bb0515c + dac1ecd commit 435bcc2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 20 deletions.
33 changes: 13 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [Git](https://git-scm.com/downloads) (of course!)
- [Python 3.9](https://www.python.org/downloads/release/python-395/) or greater
- [AWS CLI configuration](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config)
___
### Initial set up (Linux, Mac, & Windows)
1. Clone the repository
```sh
Expand All @@ -18,35 +19,27 @@ cd cloud-browser
```sh
pip install -r requirements.txt
```
2. Set the `FLASK_APP` environment variable
2. Run the `startup.sh` script with the `-d` flag to initialize the database
```sh
export FLASK_APP=cloud_browser
```
3. Initialize the database
```sh
flask init-database
```
4. Run the application
```sh
flask run
./startup.sh -d
```
3. Navigate to localhost:5000 in a browser

**Note:** To run the application after the database has been initialized, simply run `./startup.sh`
___
### Running the application (in PowerShell)
1. Install the dependecies with `pip`
```powershell
py -m pip install -r .\requirements.txt
```
2. Set the `FLASK_APP` environment variable
```powershell
$env:FLASK_APP="cloud_browser"
```
3. Initialize the database
```powershell
py -m flask init-database
```
4. Run the application
2. Run the `startup.ps1` script with the `-d` flag to initialize the database
```powershell
py -m flask run
.\startup.ps1 -d
```
3. Navigate to localhost:5000 in a browser

**Note:** To run the application after the database has been initialized, simply run `.\startup.ps1`
___
### Initialize settings
1. Enter the desired regions and tags on the settings page. For example:
![alt text](cloud_browser/static/images/settings.png)
1 change: 1 addition & 0 deletions cloud_browser/database/schema.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DROP TABLE IF EXISTS settings_exclude_tags;
DROP TABLE IF EXISTS settings_putty_session_names;
DROP TABLE IF EXISTS settings_query_regions;
DROP TABLE IF EXISTS settings_query_tags;

Expand Down
11 changes: 11 additions & 0 deletions startup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
param (
[switch] $d
)

$env:FLASK_APP="cloud_browser"

if ($d) {
py -m flask init-database
}

py -m flask run
8 changes: 8 additions & 0 deletions startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
export FLASK_APP=cloud_browser

if [[ $* == *--d* ]]; then
flask init-database
fi

flask run

0 comments on commit 435bcc2

Please sign in to comment.