system-config/playbooks/roles/lodgeit/templates/docker-compose.yaml.j2
Clark Boylan e5081581d4 Switch lodgeit to run under a dedicated user
This updates the lodgeit paste service to run under a dedicated user. We
defer on updating the image to do this as we should coordinate with
vexxhost on how that will impact them. This should be fine though as
gerritbot updates proved we can run it this way.

Change-Id: I44d3c53a01be475db1bfa17200da0a4800f85628
2021-11-19 09:11:38 -08:00

39 lines
1.2 KiB
Django/Jinja

version: '2'
services:
mariadb:
image: docker.io/library/mariadb:10.4
network_mode: host
restart: always
environment:
MYSQL_ROOT_PASSWORD: "{{ lodgeit_db_password }}"
MYSQL_DATABASE: "{{ lodgeit_db_dbname }}"
MYSQL_USER: "{{ lodgeit_db_username }}"
MYSQL_PASSWORD: "{{ lodgeit_db_password }}"
command: [
'--wait_timeout=28800',
]
volumes:
- /var/lib/lodgeit/mariadb:/var/lib/mysql
logging:
driver: syslog
options:
tag: "docker-mariadb"
lodgeit:
image: docker.io/opendevorg/lodgeit
depends_on:
- mariadb
restart: always
network_mode: host
user: "10100:10100"
command: ['/bin/bash', '-c', 'echo "*** Starting"; sleep 30; /usr/local/bin/uwsgi']
logging:
driver: syslog
options:
tag: "docker-lodgeit"
environment:
LODGEIT_DBURI: 'mysql+pymysql://{{ lodgeit_db_username }}:{{ lodgeit_db_password }}@127.0.0.1:3306/{{ lodgeit_db_dbname }}'
LODGEIT_SECRET_KEY: '{{ lodgeit_secret_key }}'
LODGEIT_TITLE_OVERRIDE: '<img src="/assets/opendev.svg" style="width: 100px; padding-bottom:10px; margin-left:20px;" alt="Opendev Pastebin">'