https://github.com/mbrsagor/product
FastAPI postgresql product backend web app
https://github.com/mbrsagor/product
docker fastapi postgresql python
Last synced: 2 months ago
JSON representation
FastAPI postgresql product backend web app
- Host: GitHub
- URL: https://github.com/mbrsagor/product
- Owner: mbrsagor
- Created: 2021-01-22T13:24:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T21:42:07.000Z (about 3 years ago)
- Last Synced: 2025-06-22T11:40:58.503Z (about 1 year ago)
- Topics: docker, fastapi, postgresql, python
- Language: Python
- Homepage: https://github.com/mbrsagor/product
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Product App
> The project is basically fast api product app concept to develop microservice based backend web application.
The following steps will walk you thru installation on a Mac. Linux should be similar. It's also possible to develop on
a Windows machine, but I have not documented the steps. If you've developed the apps on Windows, you should have little
problem getting up and running.
#### Setup:
- python3.10
- Fast API
- Postgres
###### Instructions:
#### Setup: 1
```bash
git clone https://github.com/mbrsagor/product.git
cd product
virtualenv venv --python=python3.10
pip install -r requirements.txt
```
#### Setup: 2
Create database using PSQL command line
```bash
sudo -u postgres psql
```
```postgresql
CREATE DATABASE product;
CREATE USER dev WITH PASSWORD '12345';
ALTER ROLE dev SET client_encoding TO 'utf8';
ALTER ROLE dev SET default_transaction_isolation TO 'read committed';
ALTER ROLE dev SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE product TO dev;
\q
```
#### Setup: 3
Migrate database:
```bash
python create_db.py
```
#### Setup: 4
Run the product if everything is alright:
```bash
uvicorn main:app --host 0.0.0.0 --port 8000
```