diff --git a/blueprints/gitea-mysql/docker-compose.yml b/blueprints/gitea-mysql/docker-compose.yml new file mode 100644 index 00000000..d06c1440 --- /dev/null +++ b/blueprints/gitea-mysql/docker-compose.yml @@ -0,0 +1,44 @@ +version: "3.8" + +services: + gitea: + image: docker.gitea.com/gitea:1.24.4 + restart: unless-stopped + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=mysql + - GITEA__database__HOST=mysql:3306 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=${GITEA_DB_PASSWORD:-gitea} + volumes: + - gitea-data:/data + expose: + - "3000" + - "22" + depends_on: + - mysql + healthcheck: + test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + interval: 15s + timeout: 5s + retries: 10 + + mysql: + image: docker.io/library/mysql:8 + restart: unless-stopped + environment: + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-gitea} + - MYSQL_USER=gitea + - MYSQL_PASSWORD=${GITEA_DB_PASSWORD:-gitea} + - MYSQL_DATABASE=gitea + command: ["--default-authentication-plugin=mysql_native_password"] + volumes: + - mysql-data:/var/lib/mysql + expose: + - "3306" + +volumes: + gitea-data: {} + mysql-data: {} diff --git a/blueprints/gitea/gitea.png b/blueprints/gitea-mysql/gitea.png similarity index 100% rename from blueprints/gitea/gitea.png rename to blueprints/gitea-mysql/gitea.png diff --git a/blueprints/gitea-mysql/template.toml b/blueprints/gitea-mysql/template.toml new file mode 100644 index 00000000..7f087168 --- /dev/null +++ b/blueprints/gitea-mysql/template.toml @@ -0,0 +1,23 @@ +[variables] +main_domain = "${domain}" +db_password = "${password:24}" +db_root_password = "${password:24}" + +[config] +[[config.domains]] +serviceName = "gitea" +port = 3000 +host = "${main_domain}" + +[config.env] +USER_UID = "1000" +USER_GID = "1000" +GITEA__database__DB_TYPE = "mysql" +GITEA__database__HOST = "mysql:3306" +GITEA__database__NAME = "gitea" +GITEA__database__USER = "gitea" +GITEA__database__PASSWD = "${db_password}" +GITEA_DB_PASSWORD = "${db_password}" +MYSQL_ROOT_PASSWORD = "${db_root_password}" + +[[config.mounts]] \ No newline at end of file diff --git a/blueprints/gitea-postgres/docker-compose.yml b/blueprints/gitea-postgres/docker-compose.yml new file mode 100644 index 00000000..ddecaf7b --- /dev/null +++ b/blueprints/gitea-postgres/docker-compose.yml @@ -0,0 +1,42 @@ +version: "3.8" + +services: + gitea: + image: docker.gitea.com/gitea:1.24.4 + restart: unless-stopped + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=postgres:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=${GITEA_DB_PASSWORD:-gitea} + volumes: + - gitea-data:/data + expose: + - "3000" + - "22" + depends_on: + - postgres + healthcheck: + test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + interval: 15s + timeout: 5s + retries: 10 + + postgres: + image: docker.io/library/postgres:14 + restart: unless-stopped + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=${GITEA_DB_PASSWORD:-gitea} + - POSTGRES_DB=gitea + volumes: + - pg-data:/var/lib/postgresql/data + expose: + - "5432" + +volumes: + gitea-data: {} + pg-data: {} diff --git a/blueprints/gitea-postgres/gitea.png b/blueprints/gitea-postgres/gitea.png new file mode 100644 index 00000000..5dacd773 Binary files /dev/null and b/blueprints/gitea-postgres/gitea.png differ diff --git a/blueprints/gitea-postgres/template.toml b/blueprints/gitea-postgres/template.toml new file mode 100644 index 00000000..f5b15238 --- /dev/null +++ b/blueprints/gitea-postgres/template.toml @@ -0,0 +1,21 @@ +[variables] +main_domain = "${domain}" +db_password = "${password:24}" + +[config] +[[config.domains]] +serviceName = "gitea" +port = 3000 +host = "${main_domain}" + +[config.env] +USER_UID = "1000" +USER_GID = "1000" +GITEA__database__DB_TYPE = "postgres" +GITEA__database__HOST = "postgres:5432" +GITEA__database__NAME = "gitea" +GITEA__database__USER = "gitea" +GITEA__database__PASSWD = "${db_password}" +GITEA_DB_PASSWORD = "${db_password}" + +[[config.mounts]] \ No newline at end of file diff --git a/blueprints/gitea-sqlite/docker-compose.yml b/blueprints/gitea-sqlite/docker-compose.yml new file mode 100644 index 00000000..20034fae --- /dev/null +++ b/blueprints/gitea-sqlite/docker-compose.yml @@ -0,0 +1,25 @@ +version: "3.8" + +services: + gitea: + image: docker.gitea.com/gitea:1.24.4 + restart: unless-stopped + environment: + - USER_UID=1000 + - USER_GID=1000 + # SQLite (default) lives at /data/gitea + # Example optional overrides (set in template.toml env or UI): + # - GITEA__mailer__ENABLED=true + volumes: + - gitea-data:/data + expose: + - "3000" # Web UI + - "22" # SSH (internal only) + healthcheck: + test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"] + interval: 15s + timeout: 5s + retries: 10 + +volumes: + gitea-data: {} diff --git a/blueprints/gitea-sqlite/gitea.png b/blueprints/gitea-sqlite/gitea.png new file mode 100644 index 00000000..5dacd773 Binary files /dev/null and b/blueprints/gitea-sqlite/gitea.png differ diff --git a/blueprints/gitea-sqlite/template.toml b/blueprints/gitea-sqlite/template.toml new file mode 100644 index 00000000..49368eec --- /dev/null +++ b/blueprints/gitea-sqlite/template.toml @@ -0,0 +1,23 @@ +[variables] +main_domain = "${domain}" + +[config] +[[config.domains]] +serviceName = "gitea" +port = 3000 +host = "${main_domain}" + +[config.env] +USER_UID = "1000" +USER_GID = "1000" + +# Optional: enable SMTP (or set later in UI) +# GITEA__mailer__ENABLED = "true" +# GITEA__mailer__FROM = "gitea@${username}.example.com" +# GITEA__mailer__PROTOCOL = "smtps" +# GITEA__mailer__SMTP_ADDR = "smtp.example.com" +# GITEA__mailer__SMTP_PORT = "465" +# GITEA__mailer__USER = "apikey" +# GITEA__mailer__PASSWD = "${password:32}" + +[[config.mounts]] \ No newline at end of file diff --git a/blueprints/gitea/docker-compose.yml b/blueprints/gitea/docker-compose.yml deleted file mode 100644 index 5127224c..00000000 --- a/blueprints/gitea/docker-compose.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: "3.8" -services: - gitea: - image: gitea/gitea:1.22.3 - environment: - - USER_UID=${USER_UID} - - USER_GID=${USER_GID} - - GITEA__database__DB_TYPE=postgres - - GITEA__database__HOST=db:5432 - - GITEA__database__NAME=gitea - - GITEA__database__USER=gitea - - GITEA__database__PASSWD=gitea - restart: always - - volumes: - - gitea_server:/data - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - depends_on: - - db - - db: - image: postgres:17 - restart: always - environment: - - POSTGRES_USER=gitea - - POSTGRES_PASSWORD=gitea - - POSTGRES_DB=gitea - - volumes: - - gitea_db:/var/lib/postgresql/data - -volumes: - gitea_db: - gitea_server: \ No newline at end of file diff --git a/blueprints/gitea/template.toml b/blueprints/gitea/template.toml deleted file mode 100644 index 37b3f13b..00000000 --- a/blueprints/gitea/template.toml +++ /dev/null @@ -1,11 +0,0 @@ -[variables] -main_domain = "${domain}" - -[config] -env = ["USER_UID=1000", "USER_GID=1000"] -mounts = [] - -[[config.domains]] -serviceName = "gitea" -port = 3_000 -host = "${main_domain}" diff --git a/meta.json b/meta.json index de20a557..913561bc 100644 --- a/meta.json +++ b/meta.json @@ -1832,22 +1832,6 @@ "cms" ] }, - { - "id": "gitea", - "name": "Gitea", - "version": "1.22.3", - "description": "Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD.", - "logo": "gitea.png", - "links": { - "github": "https://github.com/go-gitea/gitea.git", - "website": "https://gitea.com/", - "docs": "https://docs.gitea.com/installation/install-with-docker" - }, - "tags": [ - "self-hosted", - "storage" - ] - }, { "id": "gitea-mirror", "name": "Gitea Mirror", @@ -1868,6 +1852,62 @@ "automation" ] }, + { + "id": "gitea-mysql", + "name": "Gitea (MySQL)", + "version": "1.24.4", + "description": "Gitea bundled with MySQL 8.", + "logo": "gitea.png", + "links": { + "github": "https://github.com/go-gitea/gitea", + "website": "https://gitea.io/", + "docs": "https://docs.gitea.com/" + }, + "tags": [ + "git", + "scm", + "mysql", + "developer-tools", + "self-hosted" + ] + }, + { + "id": "gitea-postgres", + "name": "Gitea (PostgreSQL)", + "version": "1.24.4", + "description": "Gitea bundled with PostgreSQL.", + "logo": "gitea.png", + "links": { + "github": "https://github.com/go-gitea/gitea", + "website": "https://gitea.io/", + "docs": "https://docs.gitea.com/" + }, + "tags": [ + "git", + "scm", + "postgres", + "developer-tools", + "self-hosted" + ] + }, + { + "id": "gitea-sqlite", + "name": "Gitea (SQLite)", + "version": "1.24.4", + "description": "Self-hosted Git service using SQLite for a simple one-container setup.", + "logo": "gitea.png", + "links": { + "github": "https://github.com/go-gitea/gitea", + "website": "https://gitea.io/", + "docs": "https://docs.gitea.com/" + }, + "tags": [ + "git", + "scm", + "developer-tools", + "self-hosted" + ] + }, { "id": "gitlab-ce", "name": "GitLab CE",