Janaka-Steph / prem-gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prem-gateway

Project Description

prem-gateway acts as an API gateway for directing and managing a multitude of operations.
It is responsible for routing requests from the frontend prem-app to either the prem-daemon for Docker image management or directly to Docker images providing prem-services.

Features

  • API Gateway
  • Authentication/Authorization
  • Domain Management
  • TLS
  • Rate Limiting
  • Logging
  • Metrics

Services

Usage

Create network:

docker network create prem-gateway

Change permission:

chmod 600 ./traefik/letsencrypt/acme.json

Start prem-gateway:

make up 

Default Let's Encrypt CA server is the staging. For production, start prem-gateway with bellow command'.

make up LETSENCRYPT_PROD=true

Stop prem-gateway:

make down

In order to restart services outside prem-gateway and to assign them with subdomain/tls certificate, use bellow command.

make up LETSENCRYPT_PROD=true SERVICES=premd,premapp

Run prem-gateway with prem-app and prem-daemon:

make runall PREMD_IMAGE={IMG} PREMAPP_IMAGE={IMG} BASIC_AUTH_CREDENTIALS={CREDENTIALS}

Stop prem-gateway, prem-app and prem-daemon:

make stopall PREMD_IMAGE={IMG} PREMAPP_IMAGE={IMG} BASIC_AUTH_CREDENTIALS={CREDENTIALS}

To generate proper credentials for basic auth, use bellow command.

echo $(htpasswd -nB {USER}) | sed -e s/\\$/\\$\\$/g

About

License:MIT License


Languages

Language:Go 84.2%Language:Makefile 8.2%Language:Dockerfile 5.8%Language:Shell 1.7%