This commit is contained in:
2026-08-20 18:03:18 +08:00
commit acd31dc2ad
2 changed files with 66 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
networks:
gitea:
external: false
services:
server:
image: docker.gitea.com/gitea:1.27.2
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- 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:
- gitea
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
depends_on:
- db
db:
image: docker.io/library/postgres:14
restart: always
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gitea
- POSTGRES_DB=gitea
networks:
- gitea
volumes:
- ./postgres:/var/lib/postgresql/data
runner:
image: gitea/runner:3.1.0-dind
networks:
- gitea
restart: always
privileged: true
depends_on:
- server
volumes:
- ./data/runner:/data
- ./runner_config:/config
environment:
- CONFIG_FILE=/config/config.yaml
- GITEA_INSTANCE_URL=http://server:3000
- DOCKER_HOST=unix:///var/run/docker.sock
# When using Docker Secrets, it's also possible to use
# GITEA_RUNNER_REGISTRATION_TOKEN_FILE to pass the location.
# The env var takes precedence.
# Needed only for the first start.
- GITEA_RUNNER_REGISTRATION_TOKEN=jf23hhmhg1Q4nzHEMgU2hj9FVPe3KpztZLWoeDE3