Code Monkey home page Code Monkey logo

ars-caddy-dev-https's Introduction

ars-caddy-dev-https

simple local https setup for development purpose based on docker, caddy, and mkcert

How to use

Prerequisite

Step by Step

  1. Install the prerequisites
  2. Run mkcert install mkcert -install
  3. Create new cert for your desired hostname mkcert example.com "*.example.com"
  • It will generate e.g example.com+1.pem & example.com+1-key.pem
  • Place it in the certs directory
  1. Create Caddyfile, place it in the root of this directory alongside the docker-compose.yml
  • you can use the Caddyfile.base to as a base for your config
  • there is some working example in Caddyfile.sample
    • hostname = alan.dev, with app running on port 9000
  1. Run docker-compose up and it's done!
  • PS the container is configured to always restart so you won't need to redo this, and your https://example.com can be accessed everytime you startup your machine, make sure your app is running on the configured port!

Reference

https://codewithhugo.com/docker-compose-local-https/

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.