Hello Everyone,
I am setting up a new server via docker. I would like to have one life-system and one test-system with different sources etc.
I am thinking about adjusting the docker-compose.yml file and kind of doubling the entries, i.e. for the volumes:
volumes:
# data directory: here are the files stored (/var/lib/egroupware by default)
life_data:
driver_opts:
type: none
o: bind
# to upgrade an existing non-docker installation most easy is to use the existing
# data directory /var/lib/egroupware AND the host database see below
#device: /var/lib/egroupware
# otherwise data is stored in data subdirectory of the current directory
device: $PWD/life_data
# test data directory: here are the files stored (/var/lib/egroupware by default)
test_data:
driver_opts:
type: none
o: bind
# to upgrade an existing non-docker installation most easy is to use the existing
# data directory /var/lib/egroupware AND the host database see below
#device: /var/lib/egroupware
# otherwise data is stored in data subdirectory of the current directory
device: $PWD/test_data
and the respective containers:
services:
egroupware_life:
# you can also use tags like: 7.3, 7.3.12 or 7.4
#image: egroupware/development:master
build: .
# setting a default language for a new installation
#environment:
#- LANG=de
volumes:
- life_sources:/var/www
- life_data:/var/lib/egroupware
- sessions:/var/lib/php/sessions
- cache:/root
# if you want to use the host database:
# 1. comment out the whole db service below AND
# 2. set EGW_DB_HOST=localhost AND
# 3. uncomment the next line and modify the host path (first one), it depends on your distro:
# - RHEL/CentOS /var/lib/mysql/mysql.sock:/var/run/mysqld/mysqld.sock
# - openSUSE/SLE /var/run/mysql/
...
egroupware_test:
# you can also use tags like: 7.3, 7.3.12 or 7.4
#image: egroupware/development:master
build: .
# setting a default language for a new installation
#environment:
#- LANG=de
volumes:
- test_sources:/var/www
- test_data:/var/lib/egroupware
- sessions:/var/lib/php/sessions
- cache:/root
# if you want to use the host database:
# 1. comment out the whole db service below AND
# 2. set EGW_DB_HOST=localhost AND
# 3. uncomment the next line and modify the host path (first one), it depends on your distro:
# - RHEL/CentOS /var/lib/mysql/mysql.sock:/var/run/mysqld/mysqld.sock
# - openSUSE/SLE /var/run/mysql/mysql.sock:/var/run/mysqld/mysqld.sock
# - Debian/Ubuntu /var/run/mysqld:/var/run/mysqld
#- /var/run/mysqld:/var/run/mysqld
# private CA so egroupware can validate your certificate to talk to Collabora or Rocket.Chat
# multiple certificates (eg. a chain) have to be single files in a directory, with one named private-ca.crt!
#- /etc/egroupware-docker/private-ca.crt:/usr/local/share/ca-certificates/private-ca.crt:ro
environment:
#
# MariaDB/MySQL host to use: for internal service use "db", for host database (socket bind-mounted into container) use "localhost"
- EGW_DB_HOST=db
# grant host is needed for NOT using localhost / unix domain socket for MySQL/MariaDB
- EGW_DB_GRANT_HOST=172.%
# for internal db service you should to specify a root password here AND in db service
# a database "egroupware" with a random password is created for you on installation (password is stored in header.inc.php in data directory)
#- EGW_DB_ROOT=root
…
Does somebody see a problem with this approach or is there a better solution?
Thanks for any input and best regards
Alex