Skip to content

Boilerplate configuration for nginx and certbot with docker-compose

License

Notifications You must be signed in to change notification settings

pngan/home-server-old

 
 

Repository files navigation

Docker Compose for Home Server

The components of the Home Server running on the Mac-Mini (Ubuntu) is configured by the docker-compose.yml file in this repo.

The main component is an nginx reverse proxy which passes commands to a number of applications.

To add a new application

  • Edit the docker-compose.yml file in this repo
  • Edit ./data/nginx/app.conf, and add new service

To start and stop docker containers

docker-compose up docker-compose down

To start and stop docker service

docker-compose stop ipmon docker-compose start ipmon

To serve files

Copy the files into the apps folder. This is mapped in the nginx container as the /apps folder.

Trouble Shooting

When docker-compose up fails

Error: similar to "docker.errors.DockerException: Credentials store error"

Solution: Edit ~/.docker/config.json so that credStore: value is empty:

{"auths":{},"credsStore":"","experimental":"disabled","stackOrchestrator":"swarm"}

Original README.md from https://github.com/wmnnd/nginx-certbot

Boilerplate for nginx with Let’s Encrypt on docker-compose

This repository is accompanied by a step-by-step guide on how to set up nginx and Let’s Encrypt with Docker.

init-letsencrypt.sh fetches and ensures the renewal of a Let’s Encrypt certificate for one or multiple domains in a docker-compose setup with nginx. This is useful when you need to set up nginx as a reverse proxy for an application.

Installation

  1. Install docker-compose.

  2. Clone this repository: git clone https://github.com/wmnnd/nginx-certbot.git .

  3. Modify configuration:

  • Add domains and email addresses to init-letsencrypt.sh
  • Replace all occurrences of ngan.familyds.com with primary domain (the first one you added to init-letsencrypt.sh) in data/nginx/app.conf
  1. Run the init script:

     ./init-letsencrypt.sh
    
  2. Run the server:

     docker-compose up
    

Got questions?

Feel free to post questions in the comment section of the accompanying guide

License

All code in this repository is licensed under the terms of the MIT License. For further information please refer to the LICENSE file.

About

Boilerplate configuration for nginx and certbot with docker-compose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 52.7%
  • Shell 47.3%