Merge "etherpad: redirect container logs"

This commit is contained in:
Zuul 2022-11-15 19:35:25 +00:00 committed by Gerrit Code Review
commit b0ea6c601e
2 changed files with 17 additions and 0 deletions

View File

@ -15,11 +15,19 @@ services:
volumes:
- /var/etherpad/db:/var/lib/mysql
- /etc/etherpad/mysql:/etc/mysql/conf.d
logging:
driver: syslog
options:
tag: "docker-mariadb"
etherpad:
restart: always
image: docker.io/opendevorg/etherpad
network_mode: host
environment:
NODE_ENV: production
logging:
driver: syslog
options:
tag: "docker-etherpad"
volumes:
- /etc/etherpad/settings.json:/opt/etherpad-lite/settings.json

View File

@ -25,3 +25,12 @@ def test_etherpad_robots(host):
'--resolve etherpad.opendev.org:443:127.0.0.1 '
'https://etherpad.opendev.org/robots.txt')
assert 'Disallow: /' in cmd.stdout
def test_etherpad_logs(host):
etherpad_log_file = host.file('/var/log/containers/docker-etherpad.log')
assert etherpad_log_file.exists
assert etherpad_log_file.contains('Etherpad is running')
mariadb_log_file = host.file('/var/log/containers/docker-mariadb.log')
assert mariadb_log_file.exists
assert mariadb_log_file.contains('mysqld: ready for connections')