Katherine Hsu: kaishih@uci.edu,
Hailey Lin: weixil4@uci.edu,
Jiaen Zhang: jiaenz@uci.edu,
Yi-Ju Tsai,
Gabrielle Palar
Double check Python3
and Pip3
are installed
Homebrew installation for macOS
`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
`brew install git`
`brew install postgresql`
`brew install python@3.10`
Chocolatey installation for Windows
`Run Powershell as Admin`
`Set-ExecutionPolicy AllSigned`
`Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))`
verify `chocolatey` is installed: `choco -?`
`choco install git`
`choco install postgresql`
`choco install python --version=3.10.7`
-
Setup virtual environment
cd UCI-CubeSat-Server
python3 -m venv venv
-
Activate venv:
macOS/Linux:
. venv/bin/activate
Windows:
. venv/Scripts/activate
-
Install postgreSQL:
macOS/Linux:
brew install postgresql
Windows:
choco install postgresql
-
Install requirements.txt:
pip3 install -r 'requirements.txt'
-
Create
.env
fileCreate a new file under the UCI-CubeSat-Server root folder, named
.env
Ask in the #gs-server-secret discord channel for a copy of the
.env
file. -
Run Quart:
quart run
Reopen your IDE and retry if
quart run
does not work initially
-
Double check you have PostgreSQL installed:
pg_config --version
More information about our database information can be found on: heroku-postgresql
-
Access Database:
Method a. Command Line Interface(CLI)
heroku pg:psql postgresql-solid-33882 --app uci-cubesat-server-dev SELECT * FROM "two_line_element";
Method b. DataGrip
Elephant SQL is a software-as-a-service company that host PostgreSQL databases and handles the server configuration, backups and data connections on top of AWS.
-
Visit ElephantSQL Dashboard to access connection credential information
-
Open DataGrip
-
Open manage data sources using command+;
-
Click on the add button on the top left corner, find PostgreSql, fill in the config based on ElephantSQL
- DG[Host] = ElephantSQL[Server]
- DG[User] = ElephantSQL[User & Default Database]
- DG[Password] = ElephantSQL[password]
- DG[Database] = ElephantSQL[User & Default Database]
- DG[URL] = jdbc:postgresql://castor.db.elephantsql.com/omoglffn
- Click on "Test Connection"
- If Succeed, click on apply and OK
-
Now, you can write SQL query inside console. To open the console, use shift + command + L
-
-
cd to UCI-CubeSat-Server:
create venv environment
quart run
-
cd to UCI-CubeSat-Dashboard:
npm start
Deploying to Heroku require significant configuration
The client and server must be deploy to different dyno/app
For Python Quart server, Heroku require you to have:
app.py
at project's root directory
web: hypercorn app:app
inside Procfile
at project's root directory
pip
requirements.txt
at project's root directory
Adding Python
build pack