@@ -12,30 +12,55 @@ This was designed to be used with RabbitMQ, but likely will work with any AMQP-b
1212- pip
1313
1414### Environment Variables
15- - ` RPC_URI ` : The URI of the message broker. E.G ` amqp://guest:guest@localhost/ `
16- - ` PORT ` : The port to run the application on. (Default: 2000)
15+ - ` RPC_URI ` : The URI of the message broker. E.G ` amqp://guest:guest@localhost:5672/ `
1716
1817### Docker
19- You cause pull the container from Github container registry
18+ You can run the container by pulling from Github container registry
2019``` bash
21- docker pull ghcr.io/iplsplatoon/AMQP-restapi:master
20+ docker run ghcr.io/iplsplatoon/AMQP-restapi:master -p 2000:2000 -e RPC_URI=amqp://guest:guest@localhost:5672/
2221```
2322
2423or use ` ghcr.io/iplsplatoon/ampq-restapi:master ` as the image name in your docker-compose file.
2524
25+ Example ` docker-compose ` file:
26+ ``` yaml
27+ services :
28+ rabbitmq :
29+ image : rabbitmq:3-management-alpine
30+ restart : unless-stopped
31+ container_name : ' rabbitmq'
32+ ports :
33+ - " 5672:5672"
34+ - " 15672:15672"
35+ volumes :
36+ - ./volumes/rabbitmq/data/:/var/lib/rabbitmq/
37+ - ./volumes/rabbitmq/log/:/var/log/rabbitmq
38+ rest-amqp :
39+ image : b9d1a35b
40+ ports :
41+ - " 2000:2000"
42+ environment :
43+ RPC_URI : amqp://guest:guest@rabbitmq:5672
44+ ` ` `
45+
2646### Install: Bare Metal
47+ You can run the application using the Fastapi CLI
48+
27491. Install python dependencies with pip
2850 ` ` ` bash
2951 pip install -r requirements.txt
3052 ```
3153
32- 3 . Run the application
54+ 2 . Run the application
3355 ` ` ` bash
34- python -m restapi
56+ fastapi dev restapi/main.py
3557 ` ` `
3658
59+ # ### Ports
60+ The application will run on port `2000` by default. In docker you can change this by changing the `-p` flag in the
61+ docker run command or in your docker-compose file. For bare metal, you can change the port by using the `--port`
62+
3763# ## Making requests
38- The application will run on port 2000 by default.
3964
4065# ### Docs
4166The application is documented using OpenAPI.
0 commit comments