Giter VIP home page Giter VIP logo

compose-dev-tls's Introduction

Docker Compose + Traefik TLS Proxy + Self-signed Wildcard Cert

This is a template of the solution I've used in various forms for years for local development. It's easy, flexable, and gives me a near magical solution for always running HTTP apps through docker-compose with TLS, any DNS name, all on a single port with host-header SNI routing via Traefik proxy.

Why would you want this?

  • You want to use TLS locally in HTTP development
  • You would like a single proxy app to all of your containers (microservices, etc.) on 80/443
  • You'd like to use domain names for all your compose services, like https://api.bret.lol without touching /etc/hosts
  • You'd like a trusted certificate in your browsers for local dev and test of any app hostname (api, www, blog, etc.)
  • You'd like this to all happen consistanly across all your dev projects

Inspired by this great Traefik + Compose walkthough

Overall Steps to Implement

  1. Decide on your URL scheme like *.xip.io, *.localhost, *.vcap.me, or even *.bret.lol
  2. Create and install a self-signed wildcard cert for your browser with cert.sh
  3. Add this docker-compose.yaml and traefik.yaml to your projects, and replace the nginx/httpd example compose services with your apps

Decide on Your URL Scheme

TODO

Create and Install a Self-Signed Wildcard Certificate

TODO

Add Compose+Traefik YAML to Your Projects

TODO

This repository uses The Unlicense

compose-dev-tls's People

Contributors

bretfisher avatar

Watchers

James Cloos avatar

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.