system-config/playbooks/roles/refstack/templates/docker-compose.yaml.j2
Ian Wienand 56a31cb114 refstack: capture container logs to disk
We have setup rsyslogd/logrotate to handle anything with docker- tags
to be persisted to disk in /var/log/containers.  Set this up here so
we keep track of the mariadb and refstack logs.

Change-Id: I760cfeb7226f79986fbf9d7dbc5f899fc87a0cd1
2021-02-11 10:51:30 +11:00

36 lines
951 B
Django/Jinja

# Version 2 is the latest that is supported by docker-compose in
# Ubuntu Xenial.
version: '2'
services:
mariadb:
image: docker.io/library/mariadb:10.4
network_mode: host
restart: always
environment:
MYSQL_ROOT_PASSWORD: "{{ refstack_root_db_password }}"
MYSQL_DATABASE: refstack
MYSQL_USER: "{{ refstack_db_username }}"
MYSQL_PASSWORD: "{{ refstack_db_password }}"
volumes:
- /var/lib/refstack/db:/var/lib/mysql
logging:
driver: syslog
options:
tag: "docker-mariadb"
refstack-api:
depends_on:
- mariadb
image: opendevorg/refstack:latest
network_mode: host
restart: always
volumes:
- /var/lib/refstack/etc/refstack.conf:/etc/refstack.conf
- /var/lib/refstack/etc/config.json:/refstack-ui/app/config.json
- /var/lib/refstack/data:/var/run/data
logging:
driver: syslog
options:
tag: "docker-refstack-api"