Sign inSign up

eliasmeireles/proxy-server

By eliasmeireles

•Updated about 2 years ago

Image
0

299

eliasmeireles/proxy-server repository overview

⁠Server configuration yaml

  • Specify the server configuration of a target server
NameRequiredTypeDefaultDescription
CONFIG_BASE_PATHfalseString/opt/proxy-server/configDirectory that contains all configuration files
HTTPS_ENABLEfalseBooleanfalseEnable domain certificates for the registered domains
HTTP_PORTfalseString80Http listener port
HTTPS_PORTfalseString443Https listener port
LOGSTASH_URIfalseStringUri of logstash server
LOGSTASH_TIMEOUTfalseInt5 secLogstash send log timeout
LOGSTASH_ENABLEDfalseBooleanfalseDisable or enable logstash
LOGGER_PATHfalseString/var/log/proxy-serverPath to store the logs

⁠Logstash

By providing the LOGSTASH_URI and LOGSTASH_ENABLED the server will send the logs to the logstash server

⁠Example

All the configuration file must be in the CONFIG_BASE_PATH directory

  • Origin access configuration
origins:
  - my-domain.com
  • Redirect configuration
# Example of frontend configuration
# my-domain.com.app.yaml
config:
  serviceName: "/"
  baseHost:
    - "my-domain.com"
  targetHost: "http://172.17.0.1:1080/"
  pathRewrites:
    - regex: "/"
      target: "/"
# Example of backend configuration
# my-domain.com.backend.yaml
config:
  serviceName: "api/my-backend/v1"
  baseHost:
    - "my-domain.com"
  targetHost: "http://172.17.0.1:8080/"
  pathRewrites:
    - regex: "/"
      target: "/"
  • Domain configuration with TLS

Required only if HTTPS_ENABLE is true

domain:
  host: "my-domain.com"
  cert: "/etc/letsencrypt/live/www.my-domain.com/fullchain.pem"
  key: "/etc/letsencrypt/live/www.my-domain.com/privkey.pem"
  • Run the server
docker run -d --rm --name proxy-server \
        -e CONFIG_BASE_PATH=/opt/proxy-server/config \
        -e HTTPS_ENABLE=false \
        -e LOGSTASH_URI=logstash:5000 \
        -e LOGSTASH_ENABLED=false \
        -v /opt/proxy-server/config:/opt/proxy-server/config \
        -v /etc/letsencrypt:/etc/letsencrypt \
        eliasmeireles/proxy-server

Tag summary

Content type

Image

Digest

sha256:f8c60db80…

Size

13.4 MB

Last updated

about 2 years ago

docker pull eliasmeireles/proxy-server