Giter Site home page Giter Site logo

proxy's Introduction

Proxy

Introduction

Set of scripts to deploy an Nginx proxy with letsencrypt certificates to serve everything over SSL.

Configuration

Configuration file

The configuration for the entire setup is described in a YAML file. Create config.yml

The following structure is expected:

---
email: [email protected]
domains:
  sub1.domain.com:
    /: http://container
  sub2.domain.com:
    /: http://service:1234
    /api: http://api:1234
  sub3.domain.com:
    /: http://service:1234
    auth: http://auth/auth
    auth_error: http://auth/login
  www.domain.com:
    /: file:///data/www/static

Run gen-config.sh in bin/. This will generate the configuration files for both Nginx and letsencrypt.

Start Nginx

Start the proxy by using docker-compose in proxy/. docker-compose up

Generate the certificates

Execute certonly.sh in bin/ to create the certificates with letsencrypt.

Reconfigure Nginx

Execute gen-config.sh in bin/ once more to have the new configuration for Nginx (with SSL).

You can use the following to force Nginx to reload its config. docker kill --signal=HUP nginx-proxy

Proxied servers

If you run your proxied servers on Docker as well, they need to join the proxy_default docker network so that the proxy can talk to them.

Here is an example

version: '2'
networks:
  default:
    external:
      name: proxy_default
services:
  myservice:
    build: .

Renew certificates

To renew the certificates, execute renew.sh in bin/.

proxy's People

Contributors

bezerker avatar hwaterke avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

sbrock

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.