diff --git a/apps/dokploy/public/templates/gitea.png b/apps/dokploy/public/templates/gitea.png new file mode 100644 index 00000000..5dacd773 Binary files /dev/null and b/apps/dokploy/public/templates/gitea.png differ diff --git a/apps/dokploy/templates/gitea/docker-compose.yml b/apps/dokploy/templates/gitea/docker-compose.yml new file mode 100644 index 00000000..679936fb --- /dev/null +++ b/apps/dokploy/templates/gitea/docker-compose.yml @@ -0,0 +1,37 @@ +version: "3.8" +services: + gitea: + image: gitea/gitea:1.22.2 + 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 + networks: + - dokploy-network + volumes: + - gitea_server:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + depends_on: + - db + + db: + image: postgres:16 + restart: always + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=gitea + - POSTGRES_DB=gitea + networks: + - dokploy-network + volumes: + - gitea_db:/var/lib/postgresql/data + +volumes: + gitea_db: + gitea_server: \ No newline at end of file diff --git a/apps/dokploy/templates/gitea/index.ts b/apps/dokploy/templates/gitea/index.ts new file mode 100644 index 00000000..92a20df6 --- /dev/null +++ b/apps/dokploy/templates/gitea/index.ts @@ -0,0 +1,24 @@ +import { + type DomainSchema, + type Schema, + type Template, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainDomain = generateRandomDomain(schema); + + const domains: DomainSchema[] = [ + { + host: mainDomain, + port: 3000, + serviceName: "gitea", + }, + ]; + const envs = ["USER_UID=1000", "USER_GID=1000"]; + + return { + envs, + domains, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index eca30ee5..66a717b6 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -482,4 +482,19 @@ export const templates: TemplateData[] = [ tags: ["chatbot", "builder", "open-source"], load: () => import("./typebot/index").then((m) => m.generate), }, + { + id: "gitea", + name: "Gitea", + version: "1.22.2", + 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"], + load: () => import("./gitea/index").then((m) => m.generate), + }, ];