added redis / changed memcached

Signed-off-by: André Bauer <andre.bauer@staffbase.com>
This commit is contained in:
André Bauer 2021-10-05 09:02:59 +02:00
parent 3ee45dc607
commit 514fc081bf
3 changed files with 23 additions and 6 deletions

2
.env
View File

@ -3,4 +3,4 @@ POSTGRES_PASS=zammad
POSTGRES_USER=zammad
RESTART=always
# don't forget to add the minus before the version
VERSION=-4.1.0-6
VERSION=-4.1.1

View File

@ -10,8 +10,7 @@ set -e
: "${ELASTICSEARCH_NAMESPACE:=zammad}"
: "${ELASTICSEARCH_REINDEX:=true}"
: "${ELASTICSEARCH_SSL_VERIFY:=true}"
: "${MEMCACHED_HOST:=zammad-memcached}"
: "${MEMCACHED_PORT:=11211}"
: "${MEMCACHE_SERVERS:=zammad-memcached:11211}"
: "${NGINX_PORT:=8080}"
: "${NGINX_SERVER_NAME:=_}"
: "${NGINX_SERVER_SCHEME:=\$scheme}"
@ -22,6 +21,7 @@ set -e
: "${POSTGRESQL_DB:=zammad_production}"
: "${POSTGRESQL_DB_CREATE:=true}"
: "${RAILS_TRUSTED_PROXIES:=['127.0.0.1', '::1']}"
: "${REDIS_URL:=redis://zammad-redis:6379}"
: "${RSYNC_ADDITIONAL_PARAMS:=--no-perms --no-owner}"
: "${ZAMMAD_RAILSSERVER_HOST:=zammad-railsserver}"
: "${ZAMMAD_RAILSSERVER_PORT:=3000}"
@ -58,9 +58,6 @@ if [ "$1" = 'zammad-init' ]; then
ESCAPED_POSTGRESQL_PASS=$(echo "$POSTGRESQL_PASS" | sed -e 's/[\/&]/\\&/g')
sed -e "s#.*adapter:.*# adapter: postgresql#g" -e "s#.*database:.*# database: ${POSTGRESQL_DB}#g" -e "s#.*username:.*# username: ${POSTGRESQL_USER}#g" -e "s#.*password:.*# password: ${ESCAPED_POSTGRESQL_PASS}\\n host: ${POSTGRESQL_HOST}\\n port: ${POSTGRESQL_PORT}#g" < contrib/packager.io/database.yml.pkgr > config/database.yml
# configure memcache
sed -i -e "s/.*config.cache_store.*file_store.*cache_file_store.*/ config.cache_store = :dalli_store, '${MEMCACHED_HOST}:${MEMCACHED_PORT}'\\n config.session_store = :dalli_store, '${MEMCACHED_HOST}:${MEMCACHED_PORT}'/" config/application.rb
# configure trusted proxies
sed -i -e "s#config.action_dispatch.trusted_proxies =.*#config.action_dispatch.trusted_proxies = ${RAILS_TRUSTED_PROXIES}#" config/environments/production.rb

View File

@ -85,6 +85,24 @@ services:
volumes:
- zammad-data:/opt/zammad
zammad-redis:
image: 6.2.5-alpine
restart: ${RESTART}
zammad-nginx:
command: ["zammad-nginx"]
expose:
- "8080"
depends_on:
- zammad-railsserver
image: ${IMAGE_REPO}:zammad${VERSION}
links:
- zammad-railsserver
- zammad-websocket
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
zammad-scheduler:
command: ["zammad-scheduler"]
depends_on:
@ -95,6 +113,7 @@ services:
- zammad-elasticsearch
- zammad-memcached
- zammad-postgresql
- zammad-redis
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad
@ -108,6 +127,7 @@ services:
links:
- zammad-postgresql
- zammad-memcached
- zammad-redis
restart: ${RESTART}
volumes:
- zammad-data:/opt/zammad