From ea64b9d37ceef340d802a3150523787fd5895447 Mon Sep 17 00:00:00 2001 From: Jan Kiesewetter Date: Thu, 19 Oct 2017 16:47:36 +0200 Subject: [PATCH 1/2] Provide example for using a proxy as frontend Related to #51 --- docker-compose.proxy-example.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docker-compose.proxy-example.yml diff --git a/docker-compose.proxy-example.yml b/docker-compose.proxy-example.yml new file mode 100644 index 0000000..74a54ab --- /dev/null +++ b/docker-compose.proxy-example.yml @@ -0,0 +1,14 @@ +version: '3.3' +services: + + zammad-nginx: + environment: + - VIRTUAL_HOST=helpdesk.domain.tld + networks: + - default + - proxy_2_zammad + +networks: + proxy_2_zammad: + external: + name: proxy_2_apps From 258540301e995a7167044309333fd6132cf03e11 Mon Sep 17 00:00:00 2001 From: Jan Kiesewetter Date: Mon, 13 Nov 2017 09:57:22 +0100 Subject: [PATCH 2/2] Add documentation for proxy example --- .examples/proxy/certs/.gitkeep | 0 .../proxy/docker-compose.proxy-example.yml | 0 .examples/proxy/docker-compose.yml | 16 ++++++++++++++++ README.md | 14 ++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 .examples/proxy/certs/.gitkeep rename docker-compose.proxy-example.yml => .examples/proxy/docker-compose.proxy-example.yml (100%) create mode 100644 .examples/proxy/docker-compose.yml diff --git a/.examples/proxy/certs/.gitkeep b/.examples/proxy/certs/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.proxy-example.yml b/.examples/proxy/docker-compose.proxy-example.yml similarity index 100% rename from docker-compose.proxy-example.yml rename to .examples/proxy/docker-compose.proxy-example.yml diff --git a/.examples/proxy/docker-compose.yml b/.examples/proxy/docker-compose.yml new file mode 100644 index 0000000..16563ab --- /dev/null +++ b/.examples/proxy/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3.3' +services: + frontend: + image: jwilder/nginx-proxy:alpine + restart: always + ports: + - "80:80" + - "443:443" + volumes: + - ./certs:/etc/nginx/certs + - /var/run/docker.sock:/tmp/docker.sock:ro + networks: + - 2_apps + +networks: + 2_apps: \ No newline at end of file diff --git a/README.md b/README.md index a83b498..4dd0832 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,17 @@ https://docs.zammad.org/en/latest/install-docker-compose.html ## Build Status [![Build Status](https://travis-ci.org/zammad/zammad-docker-compose.svg?branch=master)](https://travis-ci.org/zammad/zammad-docker-compose) + +## Using a reverse proxy + +In environments with more then one web applications it is necessary to use a reverse proxy to route connections to port 80 and 443 to the right application. +To run Zammad behind a revers proxy, we provide `docker-compose.proxy-example.yml` as a starting point. + +1. Copy `./.examples/proxy/docker-compose.proxy-example.yml` to your own configuration, e.g. `./docker-compose.prod.yml` + `cp ./.examples/proxy/docker-compose.proxy-example.yml ./docker-compose.prod.yml` +1. Modify the environment variable `VIRTUAL_HOST` and the name of the external network in `./docker-compose.prod.yml` to fit your environment. +1. Run docker-composer commands with the default and your configuration, e.g. `docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d` + +See `.examples/proxy/docker-compose.yml` for an example proxy project. + +Like this, you can add your `docker-compose.prod.yml` to a branch of your Git repository and stay up to date by merging changes to your branch.