🔽 Relivator: The Docker Edition (Backend) | Frontend: https://github.com/blefnk/relivator-docker-frontend | Stack: Docker, Python, FastAPI, fly.io flyctl, frontend health check and more 😊
MIT License
Frontend's Repo: https://github.com/blefnk/relivator-docker-frontend
The paths below are an example, you can use any you like.
1. Clone the repository:
mkdir C:\B\S\reliverse && cd C:\B\S\reliverse # Windows
mkdir ~/Desktop/B/S/reliverse && cd ~/Desktop/B/S/reliverse # macOS/Linux
git clone https://github.com/blefnk/relivator-docker-backend.git
cd relivator-docker-backend
2. Create and activate a virtual environment:
Windows:
python -m venv C:\B\A\python\venv\main
macOS/Linux:
python -m venv ~/Desktop/B/A/python/venv/main
3. Configure workspace:
Then open project in VSCode > Ctrl+Shift+P > Terminal: Create New Terminal
Windows:
# Ctrl+Shift+P > Python: Select Interpreter > Enter interpreter path
# Find... > And choose python.exe in C:\B\A\python\venv\main\Scripts
C:\B\A\python\venv\main\Scripts\activate.ps1 # Or use .bat when CMD
macOS/Linux:
source ~/Desktop/B/A/python/venv/main/bin/activate
4. Install dependencies:
The project already has many pre-selected good packages, so you can easily get started, or remove unused packages whenever you want.
So, to install the packages listed in requirements.txt
just run:
cd backend && pip install -r requirements.txt
Start the development server:
uvicorn main:app --reload
# http://localhost:10000
# http://localhost:10000/items/5?q=example
A tip!
Remember to work on the activate virtual environment after each new terminal with:
C:\B\A\python\venv\main\Scripts\activate.ps1 # .bat cmd, Windows
source ~/Desktop/B/A/python/venv/main/bin/activate # macOS/Linux
So you will see something like that:
(main) PS C:\B\S\reliverse\relivator-docker-backend\backend >
(main) user@machine:~/Desktop/B/S/reliverse/relivator-docker-backend/backend$
Instructions for building and running the project using Docker are forthcoming.
Getting Things Ready:
fly auth signup
or login with fly auth login
.fly launch
from inside your project source directory to create, configure, and (for most apps) deploy a new application.fly deploy
to deploy your new app (or to redeploy after changes!).Thanks for considering contributions to Reliverse, means to Relivator Universe, means to the one of main universe of Bleverse (Blefonix Multiverse)!
requirements.txt
if needed: pip freeze > requirements.txt
.flyctl deploy
.