docs: add Docker deployment example
This commit is contained in:
26
README.md
26
README.md
@@ -1,4 +1,4 @@
|
||||
# Goma Gateway - simple lightweight API Gateway.
|
||||
# Goma Gateway - simple lightweight API Gateway Management.
|
||||
|
||||
```
|
||||
_____
|
||||
@@ -9,7 +9,7 @@
|
||||
\_____|\___/|_| |_| |_|\__,_|
|
||||
|
||||
```
|
||||
Goma Gateway is a lightweight API Gateway.
|
||||
Goma Gateway is a lightweight API Gateway Management.
|
||||
|
||||
[](https://github.com/jkaninda/goma-gateway/actions/workflows/release.yml)
|
||||
[](https://goreportcard.com/report/github.com/jkaninda/goma-gateway)
|
||||
@@ -18,7 +18,7 @@ Goma Gateway is a lightweight API Gateway.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/jkaninda/goma-gateway/main/logo.png" width="150" alt="Goma logo">
|
||||
|
||||
|
||||
----
|
||||
|
||||
Architecture:
|
||||
|
||||
@@ -59,6 +59,7 @@ It comes with a lot of integrated features, such as:
|
||||
- [ ] Distributed Rate Limiting for Token based across multiple instances using Redis
|
||||
- [ ] Distributed Rate Limiting for In-Memory client IP based across multiple instances using Redis
|
||||
|
||||
----
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -90,6 +91,25 @@ docker run --rm --name goma-gateway \
|
||||
- Goma Gateway readiness: `/readyz`
|
||||
- Routes health check: `/healthz`
|
||||
|
||||
### 5. Simple deployment in docker compose file
|
||||
|
||||
```yaml
|
||||
services:
|
||||
goma-gateway:
|
||||
image: jkaninda/goma-gateway
|
||||
command: server
|
||||
healthcheck:
|
||||
test: curl -f http://localhost/readyz || exit 1
|
||||
interval: 30s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./config:/config/
|
||||
```
|
||||
|
||||
Create a config file in this format
|
||||
## Customize configuration file
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ layout: home
|
||||
nav_order: 1
|
||||
---
|
||||
|
||||
# About Goma Gateway
|
||||
# Goma Gateway
|
||||
{:.no_toc}
|
||||
Goma Gateway is a lightweight API Gateway.
|
||||
Goma Gateway is a lightweight API Gateway Management.
|
||||
|
||||
<img src="https://raw.githubusercontent.com/jkaninda/goma-gateway/main/logo.png" width="150" alt="Goma logo">
|
||||
|
||||
@@ -29,6 +29,7 @@ It comes with a lot of integrated features, such as:
|
||||
|
||||
Declare your routes and middlewares as code.
|
||||
|
||||
----
|
||||
Architecture:
|
||||
<img src="https://raw.githubusercontent.com/jkaninda/goma-gateway/main/goma-gateway.png" width="912" alt="Goma archi">
|
||||
|
||||
@@ -64,7 +65,7 @@ While it may work against different implementations, there are no guarantees abo
|
||||
|
||||
## References
|
||||
|
||||
We decided to publish this image as a simpler and more lightweight alternative because of the following requirements:
|
||||
We decided to publish this image as a simpler and more lightweight because of the following requirements:
|
||||
|
||||
- The original image is based on `Alpine` and requires additional tools, making it heavy.
|
||||
- This image is written in Go.
|
||||
|
||||
@@ -27,6 +27,25 @@ docker run --rm --name goma-gateway \
|
||||
- Goma Gateway readiness: `/readyz`
|
||||
- Routes health check: `/healthz`
|
||||
|
||||
### 5. Simple deployment in docker compose file
|
||||
|
||||
```yaml
|
||||
services:
|
||||
goma-gateway:
|
||||
image: jkaninda/goma-gateway
|
||||
command: server
|
||||
healthcheck:
|
||||
test: curl -f http://localhost/readyz || exit 1
|
||||
interval: 30s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
timeout: 10s
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./config:/config/
|
||||
```
|
||||
|
||||
## Customize configuration file
|
||||
|
||||
Example of a configuration file
|
||||
|
||||
Reference in New Issue
Block a user