Portainer Stack:
```yaml
---
version: "3.9"
services:
  gitea:
    image: gitea/gitea:${TAG-latest}
    container_name: gitea
    environment:
      - USER_UID=${PUID-1000}
      - USER_GID=${PGID-1000}
      - GITEA__database__HOST=gitea_db:3306
      - GITEA__database__NAME=db_name
      - GITEA__database__USER=db_username
      - GITEA__database__PASSWD=db_password
    restart: ${RST-unless-stopped}
    volumes:
      - /gitea/config:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    depends_on:
      - gitea_db
    ports:
      - 3000:3000
    labels:
      - com.centurylinklabs.watchtower.enable=${AutoUpdate-true}

  gitea_db:
    image: lscr.io/linuxserver/mariadb:${TAG-latest}
    container_name: gitea_db
    environment:
      - PUID=${PUID-1000}
      - PGID=${PGID-1000}
      - MYSQL_ROOT_PASSWORD=db_root_password
      - TZ=${TZ-Europe/Amsterdam}
      - MYSQL_DATABASE=db_name
      - MYSQL_USER=db_username
      - MYSQL_PASSWORD=db_password
    volumes:
      - /gitea/db:/config
    restart: ${RST-unless-stopped}
    labels:
      - com.centurylinklabs.watchtower.enable=${AutoUpdate-true}
      - hide_db=mariadb
```

Environments:
```
TAG=latest
RST=unless-stopped
NET=bridge
PUID=${PUID-1000}
PGID=${PGID-1000}
TZ=${TZ-Europe/Amsterdam}
AutoUpdate=true
```