RotherOSS / otobo-docker

OTOBO Docker and Docker Compose files.
GNU General Public License v3.0
32 stars 16 forks source link

Provide a test setup with MinIO and two webservers #99

Closed bschmalhofer closed 2 years ago

bschmalhofer commented 2 years ago

Testing the support for operation in a cluster is not straightforward. Furthermore we need to test at least S3 support from localstack and MinIO. There is a bit of support for localstack. So let's add setup for MinIO. Also, we need at least two web servers on separate file systems so that we can test the syncing of config, CSS, JS, and article data.

Multiple instances can be run by passing --scale web=2 to docker-compose. But in the current setup this is problematic, as the same port can't be exposed twice on the Docker host. There are at least two options to avoid this problem:

  1. expose the ports on two different random ports
  2. expose the web server ports via a Nginx load balancer that makes use of the round robin in the Docker DNS

Option 2. is very cheap to implement as we already have Nginx running for supporting SSL. See https://pspdfkit.com/blog/2018/how-to-use-docker-compose-to-run-multiple-instances-of-a-service-in-development/ nad

bschmalhofer commented 2 years ago

One finding is that with MinIO the password of the test user must be at least eight characters long. test/test does not work.

bschmalhofer commented 2 years ago

Use docker-compose up -d --scale web=2 for starting with two web servers. Also don't mount /opt/otobo as a volume.

bschmalhofer commented 2 years ago

See also https://github.com/RotherOSS/otobo/issues/1759.

bschmalhofer commented 2 years ago

Seems to work fine. Closing this issue.

bschmalhofer commented 2 years ago

Found a small issue with the minio service. It does not survive a reboot of the Docker host. Propably need to add:

restart: always

to docker-compose/otobo-minio.yml.