Skip to content

Commit 18fadb6

Browse files
authored
Modularize docker stack: allow loading of addiditional scenarios (#467)
* Modularize docker stack: allow loading of addiditional scenarios * Activate elasticsearch security / authentication
1 parent eba50df commit 18fadb6

37 files changed

+418
-162
lines changed

.env.dist

Lines changed: 68 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
1+
#############################################
12
# Docker Environment Variables
23
# https://docs.zammad.org/en/latest/install/docker-compose/environment.html
4+
#############################################
35

4-
# ELASTICSEARCH_VERSION=8.17.1
6+
#############################################
7+
# docker-compose.yml - These variables only need to be set if they do not have the default value.
8+
#############################################
9+
10+
# RESTART=always
11+
12+
# Use a fixed Zammad version rather than the default. If you do so,
13+
# you are responsible to update this to newer patch level versions yourself.
14+
# VERSION=6.4.1-45
15+
# You can also use floating versions that will give you automatic updates:
16+
# VERSION=6.2 # all patchlevel updates
17+
# VERSION=6 # including minor updates
18+
# VERSION=latest # all updates of stable versions, including major
19+
# VERSION=develop # bleeding-edge development version
520
# IMAGE_REPO=ghcr.io/zammad/zammad
21+
22+
# ELASTICSEARCH_VERSION=8.17.1
623
# MEMCACHE_SERVERS=zammad-memcached:11211
724
# MEMCACHE_VERSION=1.6.36-alpine
25+
# REDIS_URL=redis://zammad-redis:6379
26+
# REDIS_VERSION=7.4.2-alpine
27+
# POSTGRES_VERSION=17.2-alpine
28+
29+
# RAILS_TRUSTED_PROXIES=
30+
# ZAMMAD_HTTP_TYPE=
31+
# ZAMMAD_FQDN=
32+
833
# NGINX_PORT=8080
934
# NGINX_EXPOSE_PORT=8080
1035
# NGINX_CLIENT_MAX_BODY_SIZE=50M
@@ -13,15 +38,46 @@
1338
# POSTGRES_USER=zammad
1439
# POSTGRES_HOST=zammad-postgresql
1540
# POSTGRES_PORT=5432
16-
# POSTGRES_VERSION=17.2-alpine
1741
# POSTGRESQL_OPTIONS=?pool=50
18-
# REDIS_URL=redis://zammad-redis:6379
19-
# REDIS_VERSION=7.4.2-alpine
20-
# RESTART=always
21-
# Use a fixed version. You are responsible to update this to newer patch level versions yourself.
22-
# VERSION=6.4.1-45
23-
# You can also use floating versions that will give you automatic updates:
24-
# VERSION=6.2 # all patchlevel updates
25-
# VERSION=6 # including minor updates
26-
# VERSION=latest # all updates of stable versions, including major
27-
# VERSION=develop # bleeding-edge development version
42+
43+
# ELASTICSEARCH_SCHEMA=http
44+
# ELASTICSEARCH_HOST=zammad-elasticsearch
45+
# ELASTICSEARCH_PORT=9200
46+
# ELASTICSEARCH_USER=elastic
47+
# ELASTICSEARCH_PASS=zammad
48+
# ELASTICSEARCH_NAMESPACE=zammad
49+
# ELASTICSEARCH_REINDEX=true
50+
51+
# Variables used by ngingx-proxy container for reverse proxy creations,
52+
# for docs refer to https://github.com/nginx-proxy/nginx-proxy.
53+
# VIRTUAL_HOST=
54+
# VIRTUAL_PORT=
55+
# Variables used by acme-companion for retrieval of LetsEncrypt certificate,
56+
# for docs refer to https://github.com/nginx-proxy/acme-companion.
57+
# LETSENCRYPT_HOST=
58+
# LETSENCRYPT_EMAIL=
59+
60+
#############################################
61+
# scenarios/add-cloudflare-tunnel.yml
62+
#############################################
63+
64+
# CLOUDFLARE_TUNNEL_TOKEN=mytoken
65+
66+
#############################################
67+
# scenarios/add-external-network-to-nginx.yml
68+
#############################################
69+
70+
# ZAMMAD_NGINX_EXTERNAL_NETWORK=mynetwork
71+
72+
#############################################
73+
# scenarios/add-external-network-to-elasticsearch.yml
74+
#############################################
75+
76+
# ZAMMAD_ELASTICSEARCH_EXTERNAL_NETWORK=mynetwork
77+
78+
#############################################
79+
# scenarios/add-hostport-to-elasticsearch.yml
80+
#############################################
81+
82+
# Defaults to 9200, set this if you need another value.
83+
# ELASTICSEARCH_EXPOSE_HTTP_PORT=9200

.examples/proxy/certs/.gitkeep

Whitespace-only changes.

.examples/proxy/docker-compose.proxy-example.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.examples/proxy/docker-compose.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/linters/.yaml-lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
rules:
3+
line-length:
4+
max: 120
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
# shellcheck source=/dev/null
4+
. "$(dirname "$0")/include/functions.sh"
5+
6+
check_stack_start
7+
8+
print_heading "check for presence cloudflare tunnel container"
9+
docker compose ps | grep cloudflare-tunnel
10+
print_heading "Success - cloudflare container is present"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
# shellcheck source=/dev/null
4+
. "$(dirname "$0")/include/functions.sh"
5+
6+
check_stack_start
7+
8+
print_heading "check for presence of external network"
9+
docker inspect zammad-docker-compose-zammad-elasticsearch-1 | grep zammad-ci-external-network
10+
print_heading "Success - external network is present"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
3+
# shellcheck source=/dev/null
4+
. "$(dirname "$0")/include/functions.sh"
5+
6+
check_stack_start
7+
8+
print_heading "check for presence of external network"
9+
docker inspect zammad-docker-compose-zammad-nginx-1 | grep zammad-ci-external-network
10+
print_heading "Success - external network is present"
11+
12+
print_heading "check that nginx is not exposed on the Host"
13+
docker inspect zammad-docker-compose-zammad-nginx-1 | grep HostPort && exit 1
14+
print_heading "Success - nginx is not exposed on the host"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
# shellcheck source=/dev/null
4+
. "$(dirname "$0")/include/functions.sh"
5+
6+
check_stack_start
7+
8+
print_heading "check for hostport"
9+
docker inspect zammad-docker-compose-zammad-elasticsearch-1 | grep HostPort | grep 9201
10+
print_heading "Success - hostport is present"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
# shellcheck source=/dev/null
4+
. "$(dirname "$0")/include/functions.sh"
5+
6+
check_stack_start
7+
8+
print_heading "check for presence nginx-proxy-manager container"
9+
docker compose ps | grep nginx-proxy-manager
10+
print_heading "Success - nginx-proxy-manager container is present"

0 commit comments

Comments
 (0)