Merge pull request #57 from t3easy/proxy-example

Provide example for using a proxy as frontend
This commit is contained in:
André Bauer 2017-11-13 11:04:54 +01:00 committed by GitHub
commit 5342883533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 44 additions and 0 deletions

View File

View File

@ -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

View File

@ -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:

View File

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