ansible-role-gitea/templates/docker-compose.yaml.j2

52 lines
1.4 KiB
Django/Jinja

# ANSIBLE-MANAGED
#
# -- Diese Datei wird via Ansible verwaltet und automatisch überschrieben!
# https://azubi-gitea.int.sernet.de/mmeyer/ansible-role-gitea/src/branch/main/templates/docker-compose.yaml.j2
version: "3.8"
networks:
gitea:
external: false
services:
gitea:
image: gitea/gitea:{{ gitea_vars['version'] }}-rootless
restart: always
volumes:
- ./data:/var/lib/gitea
- ./config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "127.0.0.1:3000:3000"
- "22:2222"
user: "{{ git_user.uid }}:{{ git_user.group }}"
env_file: ./environment.env
environment:
- GITEA__mailer__PASSWD={{ vault[inventory_hostname]['gitea']['mailer']['passwd'] | default('') }}
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=db:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- "GITEA__database__PASSWD={{ vault[inventory_hostname]['gitea']['db_secret'] }}"
networks:
- gitea
depends_on:
- db
db:
image: mysql:8
restart: always
environment:
- MYSQL_DATABASE=gitea
- MYSQL_USER=gitea
- "MYSQL_PASSWORD={{ vault[inventory_hostname]['gitea']['db_secret'] }}"
- "MYSQL_ROOT_PASSWORD={{ vault[inventory_hostname]['gitea']['db_root_secret'] }}"
networks:
- gitea
volumes:
- ./mysql:/var/lib/mysql