Back-end du projet 1CS E-tourisme
avec FastAPI, PostgreSQL, Docker and Heroku.
- Docker with FastAPI and PostgresSQL.
- Authentication and securing routes with JWT tokens
- Fastapi which means an interactive API documentation.
Built on Python: 3.8.
.
├── app
│ ├── Dockerfile
│ ├── main.py
│ ├── requirements.txt
│ ├── .env
│ └── src
│ ├── api
│ ├── endpoints
│ ├── api.py
│ └── deps.py
│ ├── core
│ ├── config.py
│ └── security.py
│ ├── crud
│ ├── base.py
│ ├── db
│ ├── base_class.py
│ ├── base.py
│ ├── init_db.py
│ └── session.py
│ ├── models
│ └── schemas
└── docker-compose.yml
- clone the repository
git clone [email protected]:m0kr4n3/fastapi_projetct_template.git
cd fastapi_projetct_template/app/
- Using python
- use
venv
virtual environment
pip install venv
python -m venv venv
source $PWD/venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Create env from env template:
cp example.env .env #only once
- Put there the necessary info
- Run main.py
python main.py
- Using docker Install docker-compose if it's not done already
sudo apt install docker-compose
- Run docker-compose in the repo root directory :
sudo docker-compose up