From 2859c7125371289eeaafff45debebd43e4045683 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Sun, 21 Jun 2020 23:33:37 -0400 Subject: [PATCH 1/3] Added section to full-docker-example.md for Caddy v2. --- docs/content/doc/setup/full-docker-example.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/docs/content/doc/setup/full-docker-example.md b/docs/content/doc/setup/full-docker-example.md index 717c6dabb..105ab6232 100644 --- a/docs/content/doc/setup/full-docker-example.md +++ b/docs/content/doc/setup/full-docker-example.md @@ -218,3 +218,64 @@ services: - frontend restart: unless-stopped {{< /highlight >}} + +## Example with Caddy v2 as proxy + +You will need the following `Caddyfile` on your host (or elsewhere, but then you'd need to adjust the proxy mount at the bottom of the compose file): + +{{< highlight conf >}} +vikunja.example.com { + reverse_proxy /api/* api:3456 + reverse_proxy frontend:80 +} +{{< /highlight >}} + +`docker-compose.yml` config: + +{{< highlight yaml >}} +version: '3' + +services: + db: + image: mariadb:10 + environment: + MYSQL_ROOT_PASSWORD: supersecret + MYSQL_DATABASE: vikunja + volumes: + - ./db:/var/lib/mysql + restart: unless-stopped + api: + image: vikunja/api + environment: + VIKUNJA_DATABASE_HOST: db + VIKUNJA_DATABASE_PASSWORD: supersecret + VIKUNJA_DATABASE_TYPE: mysql + VIKUNJA_DATABASE_USER: root + VIKUNJA_DATABASE_DATABASE: vikunja + volumes: + - ./files:/app/vikunja/files + depends_on: + - db + restart: unless-stopped + frontend: + image: vikunja/frontend + restart: unless-stopped + proxy: + image: nginx + ports: + - 80:80 + volumes: + - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro + depends_on: + - api + - frontend + restart: unless-stopped + caddy: + image: caddy + restart: unless-stopped + ports: + - "80:80" + - "443:443" + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile:ro +{{< /highlight >}} -- 2.40.1 From c6980a390f55f423961d7db4e14ec93eee3f3935 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Sun, 21 Jun 2020 23:50:53 -0400 Subject: [PATCH 2/3] Fixed some leftovers from copy-paste. --- docs/content/doc/setup/full-docker-example.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/docs/content/doc/setup/full-docker-example.md b/docs/content/doc/setup/full-docker-example.md index 105ab6232..9233f765b 100644 --- a/docs/content/doc/setup/full-docker-example.md +++ b/docs/content/doc/setup/full-docker-example.md @@ -260,22 +260,15 @@ services: frontend: image: vikunja/frontend restart: unless-stopped - proxy: - image: nginx - ports: - - 80:80 - volumes: - - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro - depends_on: - - api - - frontend - restart: unless-stopped caddy: image: caddy restart: unless-stopped ports: - "80:80" - "443:443" + depends_on: + - api + - frontend volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro {{< /highlight >}} -- 2.40.1 From 5b0628233d736d37b1f23bb15ed0b5bf2e103d8b Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Sun, 21 Jun 2020 23:52:24 -0400 Subject: [PATCH 3/3] Fixed one more leftover formatting oddity. --- docs/content/doc/setup/full-docker-example.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/content/doc/setup/full-docker-example.md b/docs/content/doc/setup/full-docker-example.md index 9233f765b..096b7edf5 100644 --- a/docs/content/doc/setup/full-docker-example.md +++ b/docs/content/doc/setup/full-docker-example.md @@ -261,14 +261,14 @@ services: image: vikunja/frontend restart: unless-stopped caddy: - image: caddy - restart: unless-stopped - ports: - - "80:80" - - "443:443" - depends_on: - - api - - frontend - volumes: - - ./Caddyfile:/etc/caddy/Caddyfile:ro + image: caddy + restart: unless-stopped + ports: + - "80:80" + - "443:443" + depends_on: + - api + - frontend + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile:ro {{< /highlight >}} -- 2.40.1