Robert Middleswarth 3 лет назад
Родитель
Сommit
8089759281
2 измененных файлов с 102 добавлено и 1 удалено
  1. 46 0
      stack/gitea-mariadb.yml
  2. 56 1
      template/portainer-v2-arm64.json

+ 46 - 0
stack/gitea-mariadb.yml

@@ -0,0 +1,46 @@
+version: "3"
+services:
+  mariadb:
+    image: linuxserver/mariadb:latest
+    environment:
+      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
+      MYSQL_DATABASE: ${DATABASE_NAME}
+      MYSQL_USER: ${DATABASE_USER}
+      MYSQL_PASSWORD: ${DATABASE_PASSWORD}
+      PGID: ${PGID}
+      PUID: ${PUID}
+      TZ: ${TZ}
+    networks:
+      - gitea-mariadb_network
+    restart: unless-stopped
+    volumes:
+      - /portainer/Files/AppData/Config/Gitea/Mariadb:/config
+
+  gitea:
+    container_name: gitea
+    hostname: gitea
+    image: gitea/gitea:latest
+    environment:
+      GITEA__database__DB_TYPE: mysql
+      GITEA__database__HOST: 'mariadb':3306
+      GITEA__database__USER: ${DATABASE_USER}
+      GITEA__database__PASSWD: ${DATABASE_PASSWORD}
+      GITEA__database__NAME: ${DATABASE_NAME}
+      PGID: ${PGID}
+      PUID: ${PUID}
+      TZ: ${TZ}
+    networks:
+      - gitea-mariadb_network
+    ports:
+      - 8124:3000      
+      - 222:22      
+restart: unless-stopped
+    volumes:
+      - /portainer/Files/AppData/Config/Gitea/data:/data
+      - /etc/timezone:/etc/timezone:ro
+      - /etc/localtime:/etc/localtime:ro
+    depends_on:
+      - mariadb
+
+networks:
+  gitea-mariadb_network:

+ 56 - 1
template/portainer-v2-arm64.json

@@ -1386,7 +1386,7 @@
 			"type": 1,
 			"volumes": [
 				{
-					"bind": "/portainer/Files/AppData/Gitea",
+					"bind": "/portainer/Files/AppData/Config/Gitea",
 					"container": "/data"
 				},
 				{
@@ -1411,6 +1411,61 @@
 				}
 			]
 		},
+		{
+			"categories": [
+				"SCM",
+				"Tools"
+			],
+			"description": "Gitea with Mariadb: A painless self-hosted Git service.",
+			"logo": "https://raw.githubusercontent.com/novaspirit/pi-hosted/master/images/gitea.png",
+			"name": "gitea-mysql",
+			"note": "More possible Environment Variables: https://docs.gitea.io/en-us/install-with-docker/#managing-deployments-with-environment-variables",
+			"env": [
+				{
+					"default": "1000",
+					"label": "USER_UID",
+					"name": "USER_UID"
+				},
+				{
+					"default": "1000",
+					"label": "USER_GID",
+					"name": "USER_GID"
+				},
+                {
+					"default": "America/New_York",
+                    "label": "TZ",
+                    "name": "TZ"
+                },
+				{
+					"default": "gitea",
+					"label": "DATABASE_NAME",
+					"name": "DATABASE_NAME"
+				},
+				{
+					"default": "gitea",
+					"label": "DATABASE_USER",
+					"name": "DATABASE_USER"
+				},
+                {
+                    "label": "DATABASE_PASSWORD",
+                    "name": "DATABASE_PASSWORD",
+                    "default": ""
+                },
+				{
+                    "label": "MYSQL_ROOT_PASSWORD",
+                    "name": "MYSQL_ROOT_PASSWORD",
+                    "default": ""
+                }
+			],
+			"platform": "linux",
+			"restart_policy": "unless-stopped",
+			"title": "Gitea with Mariadb",
+			"type": 3,
+			"repository": {
+				"stackfile": "stack/gitea-mariadb.yml",
+				"url": "https://github.com/novaspirit/pi-hosted/"
+			}
+		},
 		{
 			"categories": [
 				"Other",