Skip to content

ValeriyFromUA/Real_Time_Chat

Repository files navigation

Python Docker Compose Poetry Redis FastAPI

Real_Time_Chat

This project is an educational example of using FastAPI, a modern web framework for building web applications with Python.

Installation

  1. Clone the repository: git clone https://github.com/ValeriyFromUA/Real_Time_Chat.git

  2. Create a virtual environment

  3. Install the dependencies using poetry install or pip install -r requirements.txt

  4. Create an .env file. and add your own data following the structure of the .env.sample file.

  5. Run migrations with alembic in terminal:

Hints:

  • init migrations: alembic init migrations Now 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

Tutorials:

Tutorial 1

Tutorial 2

Running with Docker Docker

  1. sudo docker-compose build
  2. sudo docker-compose run web alembic upgrade head
  3. sudo docker-compose up

Application will be available here.

Running the Server

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.

Endpoints

Swagger UI


License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors