# docker-compose-fastapi-queue-demo **Repository Path**: somenzz/docker-compose-fastapi-queue-demo ## Basic Information - **Project Name**: docker-compose-fastapi-queue-demo - **Description**: 使用 fastapi,docker-compose来快速创建一个异步任务队列 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 3 - **Created**: 2022-01-04 - **Last Updated**: 2022-10-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 说明 使用 docker-compose、FastAPI、rq 来快速创建一个包含异步任务队列集>群的 REST API,后端执行任务的节点可以随意扩展。 ## 运行 构建本地镜像 ``` cd docker-compose-fastapi-queue-demo docker build -t myproject:latest . ``` 运行容器: ``` cd docker-compose-fastapi-queue-demo docker compose -f docker-compose.yml up ``` 测试: ```sh curl -v -X POST 'http://localhost:5057/send_captcha/18012345678' curl -v -X POST 'http://localhost:5057/send_captcha/18012345678' curl -v -X POST 'http://localhost:5057/send_captcha/18012345678' ``` 代码说明见:[如何快速创建一个拥有异步任务队列集群的 REST API](https://mp.weixin.qq.com/s/Agi74bM5bNU9gr_g0TbITQ)