From 029a3197b008ecdabdbf65b5e982bcd2c79181f2 Mon Sep 17 00:00:00 2001 From: Sthope Date: Fri, 10 Sep 2021 10:50:22 +0200 Subject: [PATCH] initial commit --- .drone.yml | 50 ++++++++++++------------ _posts/2021-09-05-gitea.md | 78 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 25 deletions(-) create mode 100644 _posts/2021-09-05-gitea.md diff --git a/.drone.yml b/.drone.yml index 5a9b911..fc63ca5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -34,32 +34,32 @@ steps: status: - success -# - name: discord -# image: appleboy/drone-discord -# avatar_url: "https://git.sthope.dev/sthope/drone_test/raw/branch/master/rick.png" -# environment: -# DISCORD_WEBHOOK_ID: -# from_secret: discord_webhook_id -# DISCORD_WEBHOOK_TOKEN: -# from_secret: discord_webhook_token -# settings: -# message: > -# {{#success build.status}} -# ✅ Build #{{build.number}} of `{{repo.name}}` succeeded. +- name: discord + image: appleboy/drone-discord + avatar_url: "https://git.sthope.dev/sthope/drone_test/raw/branch/master/rick.png" + environment: + DISCORD_WEBHOOK_ID: + from_secret: discord_webhook_id + DISCORD_WEBHOOK_TOKEN: + from_secret: discord_webhook_token + settings: + message: > + {{#success build.status}} + ✅ Build #{{build.number}} of `{{repo.name}}` succeeded. -# 📝 Commit by {{commit.author}} on `{{commit.branch}}`: -# ``` -# {{commit.message}} -# ``` -# 🌐 <{{ build.link }}> -# {{else}} -# ❌ Build #{{build.number}} of `{{repo.name}}` failed. -# 📝 Commit by {{commit.author}} on `{{commit.branch}}`: -# ``` -# {{commit.message}} -# ``` -# 🌐 <{{ build.link }}> -# {{/success}} + 📝 Commit by {{commit.author}} on `{{commit.branch}}`: + ``` + {{commit.message}} + ``` + 🌐 <{{ build.link }}> + {{else}} + ❌ Build #{{build.number}} of `{{repo.name}}` failed. + 📝 Commit by {{commit.author}} on `{{commit.branch}}`: + ``` + {{commit.message}} + ``` + 🌐 <{{ build.link }}> + {{/success}} # # when: # # event: diff --git a/_posts/2021-09-05-gitea.md b/_posts/2021-09-05-gitea.md new file mode 100644 index 0000000..266df7c --- /dev/null +++ b/_posts/2021-09-05-gitea.md @@ -0,0 +1,78 @@ +--- +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. \ No newline at end of file