mirror of
https://github.com/philip306/countapi.git
synced 2024-06-15 10:55:23 +03:00
Update README.md
This commit is contained in:
parent
4544e0a41b
commit
cd3b3dcf8a
24
README.md
24
README.md
@ -5,6 +5,22 @@ This project is a clone of the functionality available at https://countapi.xyz/
|
|||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Thanks to FastAPI there is swagger/OpenAPI doc endpoints included automatically and after deployment will be available at /docs and /redoc
|
Thanks to FastAPI there is swagger/OpenAPI doc endpoints included automatically and after deployment will be available at /docs and /redoc
|
||||||
|
```
|
||||||
|
├── Dockerfile
|
||||||
|
├── README.md
|
||||||
|
├── app
|
||||||
|
│ ├── __init__.py
|
||||||
|
│ ├── conf
|
||||||
|
│ │ ├── __init__.py
|
||||||
|
│ │ └── config.py
|
||||||
|
│ ├── tests
|
||||||
|
│ │ ├── __init__.py
|
||||||
|
│ │ └── test_main.py
|
||||||
|
│ └── main.py
|
||||||
|
├── .dockerignore
|
||||||
|
├── requirements.txt
|
||||||
|
└── docker-compose.yml
|
||||||
|
```
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
@ -48,21 +64,17 @@ Navigate to http://127.0.0.1:8000 in a browser
|
|||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
|
|
||||||
Using ```docker-compose``` will using the deployment outlined in docker-compose.yml which will deploy a second container with a standard redis image
|
Using ```docker-compose``` will use the deployment outlined in docker-compose.yml which will deploy a second container with a standard redis image
|
||||||
|
|
||||||
First clone the repo locally
|
First clone the repo locally
|
||||||
|
|
||||||
``` git clone https://github.com/philip306/countapi.git ```
|
``` git clone https://github.com/philip306/countapi.git ```
|
||||||
|
|
||||||
Update config.py to point to your redis host/ip
|
|
||||||
|
|
||||||
```redishost: str = 'redis'```
|
|
||||||
|
|
||||||
From within the count api directory build the docker image
|
From within the count api directory build the docker image
|
||||||
|
|
||||||
```docker build -t countapi:0.1 .```
|
```docker build -t countapi:0.1 .```
|
||||||
|
|
||||||
Launch two separate containers with a redis image and a countapi image you just created
|
Launch two separate containers with a redis image and the countapi image you just created
|
||||||
|
|
||||||
```docker-compose up```
|
```docker-compose up```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user