automation/deployer/roles/build/templates/gitea/docker-compose.yml.j2

53 lines
1.2 KiB
Text
Raw Normal View History

version: '3'
# Generated by ansible for site {{ site.url }}
# On network {{ site.subnet_cidr_address }}:
# - web server (nginx) at {{ site.subnet_nginx_ip }}
# - site (gitea) at {{ site.subnet_site_ip }}
services:
site:
# build: site
image: gitea/gitea:{{ gitea.version }}
restart: always
environment:
APP_NAME: "Gitea: git with a cup of coffee"
2020-05-07 06:17:17 +00:00
# DOMAIN: "{{ site.url }}"
# ROOT_URL: "{{ site.url }}"
USER_UID: "{{ site.user_uid }}"
USER_GID: "{{ site.user_gid }}"
DB_TYPE: mysql
DB_HOST: "{{ site.subnet_gateway_ip }}"
DB_USER: "{{ site.mysql_username }}"
DB_PASSWD: "{{ site.mysql_password }}"
DB_NAME: "{{ site.mysql_database }}"
volumes:
- "{{ site_data_path }}:/data"
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
networks:
net:
ipv4_address: "{{ site.subnet_site_ip }}"
nginx:
build: nginx
restart: always
depends_on:
- site
volumes:
- "{{ site_data_path }}:/data"
networks:
net:
ipv4_address: "{{ site.subnet_nginx_ip }}"
networks:
net:
ipam:
driver: default
config:
- subnet: "{{ site.subnet_cidr_address }}"
volumes:
html_data: