--- layout: post title: "Gitea" description: "Gitea docker container" author: sthope image: categories: [ Docker, Portainer, Gitea, Git ] comments: true pic01: "/assets/images/portainer_oauth/1.png" pic02: "/assets/images/portainer_oauth/2.png" pic03: "/assets/images/portainer_oauth/3.png" pic04: "/assets/images/portainer_oauth/4.png" pic05: "/assets/images/portainer_oauth/5.png" pic06: "/assets/images/portainer_oauth/6.png" pic07: "/assets/images/portainer_oauth/7.png" pic08: "/assets/images/portainer_oauth/8.png" pic09: "/assets/images/portainer_oauth/9.png" pic10: "/assets/images/portainer_oauth/10.png" --- Portainer Stack: ```yaml --- version: "3.8" networks: EXTERNAL: external: name: EXTERNAL INTERNAL: external: name: INTERNAL services: gitea: image: gitea/gitea:latest restart: unless-stopped container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 networks: - EXTERNAL - INTERNAL volumes: - /gitea/data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "22:22" labels: - com.centurylinklabs.watchtower.enable=true depends_on: - gitea_db gitea_db: image: ghcr.io/linuxserver/mariadb:latest container_name: gitea_db networks: - INTERNAL environment: - PUID=1000 - PGID=1000 - MYSQL_ROOT_PASSWORD=qtzZzVt4sRcAt682 - MYSQL_DATABASE=z7twLnmEmK7A3FMv - MYSQL_USER=b2nngTxbJXbGUHkz - MYSQL_PASSWORD=yBDK68gAwJrp3Pgp - TZ=Europe/Lisbon restart: unless-stopped volumes: - /gitea/db:/config labels: - com.centurylinklabs.watchtower.enable=true - hide_db_container=true ``` If you are running reverse proxy in same docker you might not need the `ports` in the stack, otherwise change them from the default. Also before running the container, create the folders for Gitea and the DB and change the `volumes` to math. Run on the Terminal `id $USER` to know what are your `PUID`/`USER_UID` and `PGID`/`USER_GID`. [Official Documentation](https://docs.gitea.io/en-us/install-with-docker/)