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