Skip to content

ElliotReeve/voltage-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voltage App

Getting started

We use Poetry to manage dependencies and virtual environments. If you don't have it yet:

  • on macOS, you can just run brew install poetry;
  • on other platforms, consult Poetry Installation.

Then:

git clone [email protected]:ElliotReeve/voltage-app.git
cd voltage-app
cp .env.example .env
# Modify .env to suit your needs, in particular, specify DATABASE_URL
poetry install

Run the server:

poetry run uvicorn app.main:app --reload

Your API documentation should show up at http://127.0.0.1:8000/docs. Server will automatically reload when you save your code – no need to restart it by hand.

Deploy:

# Build docker image
docker build --force-rm -t voltage_app .
# Save docker image
docker save -o <path for generated tar file> <image name>
# Transfer docker image to server
scp file.txt [email protected]:/remote/directory
# Load docker image
docker load -i <path to image tar file>
# Run docker container
docker run \
-itd \
--name voltage_app \
--restart=always \
-e 'DATABASE_URL=mysql+mysqldb://[email protected]/voltage' \
-p 4000:4000 \
--network=host \
voltage_app:latest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published