Files
goma-gateway/docs/install/docker.md

57 lines
1.5 KiB
Markdown
Raw Normal View History

2024-11-09 15:06:09 +01:00
---
title: Docker
layout: default
parent: Installation
nav_order: 4
---
# Docker Installation
Details about how to use Goma in Docker can be found on the hub.docker.com repo hosting the image: Goma.
We also have some cool examples with [Docker Compose template](https://github.com/jkaninda/goma-gateway/tree/main/examples) with built-in orchestration and scalability.
## 1. Initialize configuration
You can generate the configuration file using `config init --output /etc/goma/config.yml` command.
The default configuration is automatically generated if any configuration file is not provided, and is available at `/etc/goma/goma.yml`
```shell
docker run --rm --name goma-gateway \
-v "${PWD}/config:/etc/goma/" \
jkaninda/goma-gateway config init --output /etc/goma/config.yml
```
## 2. Check configuration
```shell
docker run --rm --name goma-gateway \
-v "${PWD}/config:/etc/goma/" \
-p 8080:8080 \
2024-11-10 21:34:52 +01:00
jkaninda/goma-gateway config check --config /etc/goma/config.yml
```
2024-11-09 15:06:09 +01:00
### 3. Start server with a custom config
```shell
docker run --rm --name goma-gateway \
-v "${PWD}/config:/etc/goma/" \
-p 8080:8080 \
jkaninda/goma-gateway server --config /config/config.yml
```
### 4. Healthcheck
- Goma Gateway health check: `/health/live`
- Routes health check: `health/routes`
### 5. Simple deployment in docker compose file
```yaml
services:
goma-gateway:
image: jkaninda/goma-gateway
command: server
ports:
- "8080:8080"
- "8443:8443"
volumes:
- ./config:/etc/goma/
```