# Simple-Auth Gateway

The below example will set up a gateway to a backend via docker compose

# Data Flow

graph LR A{User} -- Web Request --> B[Simple-Auth] B -- Proxies --> C[Backend]

# docker-compose example

version: '3.3'
services:
  nginx:
    image: nginx:latest
  simpleauth:
    image: zix99/simple-auth:latest
    ports:
      - 8082:80
    environment:
      SA_WEB_LOGIN_COOKIE_JWT_SIGNINGKEY: a-unqiue-signing-key # REPLACE THIS WITH SOMETHING UNIQUE!!!!
      SA_WEB_LOGIN_SETTINGS_ROUTEONLOGIN: "/"
      SA_WEB_GATEWAY_ENABLED: 'true'
      SA_WEB_GATEWAY_TARGETS: 'http://nginx'
    volumes:
      - sadb:/var/lib/simple-auth

volumes:
  sadb: {}