Giter Club home page Giter Club logo

docker-caddy-example's Introduction

docker caddy simple

Simple self hosting setups to be able to provision services and map domains to them in an easier fashion.

If you prefer traefik over caddy, you can go through this template instead

Why

There's numerous ways to self host and I keep trying ways to make sure I can manage the server and apps even if I pick them up months later. This is one of many such setups that work well but aren't openly shared across.

Usage

Setup network

; docker network create caddy_network # create a shareable network

We create a docker shared network for all the services to talk to each other on. This allows us to configure the Caddyfile in a way that allows using service names with unpublished ports without worrying about filling up the ports on the system.

Add in the needed services

// docker-compose.example-service.yml
services:
    //... existing
    example_app:
        image: hello-world:latest
    networks:
        caddy_network:

networks:
    caddy_network:
        external: true

The important part here is to add in the networks definition both on the service and the global context of this docker file. Marking it as external lets docker compose know that it doesn't have to create another network for this service and to use an existing network.

Actions

You can now start the services, make sure to edit the Makefile to include your newly added docker-compose file

;make start
;make stop
;make restart
;make reset

docker-caddy-example's People

Contributors

barelyhuman avatar

Stargazers

 avatar

Watchers

 avatar  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.