https://github.com/madi-s/fastapi-rq
Sample dockerized web application powered by fastapi. This template includes redis queue, sockets, tests and many other useful features.
https://github.com/madi-s/fastapi-rq
docker fastapi redis rq
Last synced: 6 months ago
JSON representation
Sample dockerized web application powered by fastapi. This template includes redis queue, sockets, tests and many other useful features.
- Host: GitHub
- URL: https://github.com/madi-s/fastapi-rq
- Owner: Madi-S
- Created: 2021-08-08T07:07:21.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T03:45:04.000Z (about 4 years ago)
- Last Synced: 2023-03-05T00:18:40.511Z (over 2 years ago)
- Topics: docker, fastapi, redis, rq
- Language: Python
- Homepage:
- Size: 3.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerized FastAPI + RedisQueue application
### Run app
`docker-compose up --build`
#### Go to 127.0.0.1:5057 (main app)
#### Go to 127.0.0.1:5057/subapi (sub app)
### Run tests
Before running tests, you need to comment line #29 in main.py:
`app.mount('/static', StaticFiles(directory='static'), name='static')`
For some weird reasons, it throws an error when running the tests
Also, make sure the docker container is running (the command above)
`docker-compose exec web python run_tests.py`
OR
`docker-compose exec web python -m pytest`