From 2c80c5ac2987d4db97e22164ff57064fa25b5a56 Mon Sep 17 00:00:00 2001 From: codedge Date: Sun, 16 Aug 2020 20:03:40 +0200 Subject: [PATCH] Updated Docker Compose with Caddy (markdown) --- Docker-Compose-with-Caddy.md | 45 ++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/Docker-Compose-with-Caddy.md b/Docker-Compose-with-Caddy.md index 59f71a4..9fa1e51 100644 --- a/Docker-Compose-with-Caddy.md +++ b/Docker-Compose-with-Caddy.md @@ -5,19 +5,56 @@ The following guides aims at a completly fresh install of Invoice Ninja with the ## Table of content * Guide for [Invoice Ninja 4](#guide-for-invoice-ninja-4) -* Guide for Invoice Ninja 5 +* Guide for [Invoice Ninja 5](#guide-for-invoice-ninja-5) ## Prerequisites â„šī¸ Read the [prerequisites section](https://github.com/invoiceninja/dockerfiles/wiki/prerequisites) carefully as you need all of these information for a proper setup. -Additionally you need to have proper [TLD (Top Level Domain)](https://en.wikipedia.org/wiki/Top-level_domain) on a server that is publicly reachable (with a public IP). This is necessary for Caddy to correctly obtain the TLS certificate. -Also check the [Caddy automatic https requirements](https://caddyserver.com/docs/automatic-https). +Additionally you need to have proper [TLD (Top Level Domain)](https://en.wikipedia.org/wiki/Top-level_domain) on a server that is publicly reachable (with a public IP). This is necessary for Caddy to correctly obtain the TLS certificate. Also check the [Caddy automatic https requirements](https://caddyserver.com/docs/automatic-https). âš ī¸ If you are missing either one of these additional prerequisites, then this setup does not work for you. Please check the [setup with nginx](https://github.com/invoiceninja/dockerfiles/wiki/docker-composee-with-nginx) instead. +Even if not preferred, you can also use `https://localhost` to run IN. With that you only get a self-signed certificate and issues in your browser. Make sure you know the risk and consequences and how to tackle them. + + ## Guide for Invoice Ninja 4 +### 📁 Create a new folder + +First we need an empty folder where our docker files for IN 4 will reside. + +_Command_: `mkdir ~/invoiceninja5; cd ~/invoiceninja4` + +### đŸ’ģ Clone this repository + +Now we need to clone this repository to get all the files necessary to corretctly configure and run IN 4 with Docker Compose. + +_Command_: `git clone https://github.com/invoiceninja/dockerfiles.git .` + +### 🔨 Configure your installation + +To get the complete overview what things can be configured please check the [`docker-compose.yml`](https://github.com/invoiceninja/dockerfiles/blob/master/docker-compose.yml). Each section and value that can or should be configured is commented. + +Things you definately should check and change: + +* `APP_URL`: Environment variable where to reach your installation. This should be your valid TLD domain. +* Ports: Ports are configured for `80` and `443`. Make sure they are open and not blocked by some other service. +* Image: Set this to `invoiceninja/invoiceninja:alpine-4` to get the most recent version of IN 4 +* Database settings: You can find the default settings in the [`docker-compose.yml` file at the db service](https://github.com/invoiceninja/dockerfiles/blob/master/docker-compose.yml#L54). So for the `app` service the environment variables that should be added are: + * `DB_HOST`=db + * `DB_USERNAME`=ninja + * `DB_PASSWORD`=ninja + * `DB_DATABASE`=db-ninja-01 + +### 🚀 Run your installation + +After you finished the afore mentioned steps you can now run your installation. + +_Command_: `docker-compose up -d` + +This will run Invoice Ninja 4 with the configuration made. You should now be able to reach your installation at the `APP_URL` configured. + ## Guide for Invoice Ninja 5 ### 📁 Create a new folder @@ -38,7 +75,7 @@ To get the complete overview what things can be configured please check the [`do Things you definately should check and change: -* `APP_URL`: Environmet variable where to reach your installation. This should be your valid TLD domain. +* `APP_URL`: Environment variable where to reach your installation. This should be your valid TLD domain. * Ports: Ports are configured for `80` and `443`. Make sure they are open and not blocked by some other service. ### 🚀 Run your installation