- Ensure dependencies installed:
- python3
- make
- docker
-
With git installed, clone project:
git clone [email protected]:shaneluna/smokeynet-api.git
Note: You may need to setup an ssh key if first time using git
-
Change directory into cloned repo:
cd smokeynet-api
-
Create a virtual environment:
python -m venv venv
-
Start virutal environment:
Linux & Mac:source venv/bin/activate
Windows:
./venv/Scripts/activate
-
Install requirements:
pip install -r requirements.txt
-
Copy
.env.example
, rename to.env
, and add the API token. -
Start API for development:
make dev
# the following commands can also be used export SYNOPTIC_TOKEN=token uvicorn main:app --reload --host=0.0.0.0 --port=8000
-
API should be accessible by default at:
http://127.0.0.1:8000/
http://127.0.0.1:8000/docs
Build:
docker build -t wifire/smokeynet-api .
Run:
docker run -p 8000:8000 --env-file .env wifire/smokeynet-api
API should be accessible by default at http://127.0.0.1:8000/docs
for the docs.
make dev # Runs local
make build # Builds docker image
make run # Runs docker image