From aec9feddeae172eb361340dc331f358b0b79e952 Mon Sep 17 00:00:00 2001 From: angel Date: Thu, 12 Mar 2026 16:51:17 -0400 Subject: [PATCH] first commit. initial file upload commit. --- .env | 29 +++++++++++++++++++++++++++ README.md | 2 +- docker-compose.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 .env create mode 100644 docker-compose.yml diff --git a/.env b/.env new file mode 100644 index 0000000..6cbbbe1 --- /dev/null +++ b/.env @@ -0,0 +1,29 @@ +# --- General Configuration --- +TZ=America/New_York +USER_UID=1000 +USER_GID=1000 + +# --- Database (Postgres) Configuration --- +POSTGRES_USER=gitea +POSTGRES_PASSWORD=gitea +POSTGRES_DB=gitea + +# --- Gitea Configuration --- +GITEA__database__DB_TYPE=postgres +GITEA__database__HOST=postgres:5432 +GITEA__database__NAME=gitea +GITEA__database__USER=gitea +GITEA__database__PASSWD=gitea + +GITEA__server__PROTOCOL=http +GITEA__server__DOMAIN=git.example.com # Update with your domain +GITEA__server__ROOT_URL=https://git.example.com/ # Update with your domain +GITEA__server__HTTP_PORT=3000 +GITEA__server__SSH_PORT=2222 +GITEA_CUSTOM=/data/gitea + +# --- pgAdmin Configuration --- +PGADMIN_DEFAULT_EMAIL=admin@example.com # Update with your email +PGADMIN_DEFAULT_PASSWORD=gitea +PGADMIN_CONFIG_LOGIN_BANNER=Authorized access only +PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=True diff --git a/README.md b/README.md index 311a5f0..471811f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# gitea +# Gitea Docker files and documentation to self host gitea. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3f8120b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,49 @@ +services: + postgres: + image: postgres:16 + container_name: gitea-postgres + restart: unless-stopped + env_file: + - .env + volumes: + - postgres-data:/var/lib/postgresql/data + networks: + - gitea-net + # Do NOT publish postgres port + + gitea: + image: gitea/gitea:latest + container_name: gitea + restart: unless-stopped + depends_on: + - postgres + env_file: + - .env + volumes: + - gitea-data:/data + ports: + - "3000:3000" # HTTP (for NPM) + - "2222:22" # SSH (optional, safe non-standard port) + networks: + - gitea-net + + pgadmin: + image: dpage/pgadmin4:latest + container_name: gitea-pgadmin + restart: unless-stopped + env_file: + - .env + volumes: + - pgadmin-data:/var/lib/pgadmin + ports: + - "8081:80" # pgAdmin UI (proxy or restrict) + networks: + - gitea-net + +networks: + gitea-net: + +volumes: + gitea-data: + postgres-data: + pgadmin-data: \ No newline at end of file