This project is an educational example of using FastAPI, a modern web framework for building web applications with Python.
-
Clone the repository:
git clone https://github.com/ValeriyFromUA/Real_Time_Chat.git -
Create a virtual environment
-
Install the dependencies using
poetry installorpip install -r requirements.txt -
Create an
.envfile. and add your own data following the structure of the.env.samplefile. -
Run migrations with alembic in terminal:
- init migrations:
alembic init migrationsNow you see migrations folder and alembic.ini file
Change file migrations\env.py like in example: arch\env.py
Change file alembic.ini like in example arch\alembic.ini
- create db:
alembic revision --autogenerate -m "Database creation" - migrate:
alembic upgrade head
sudo docker-compose buildsudo docker-compose run web alembic upgrade headsudo docker-compose up
Application will be available here.
To run the FastAPI server, use the following command:
uvicorn chat.main:app --reload or
RUN make build_and_run
The server will be available at http://localhost:7000.
This project is licensed under the MIT License.