Last active
March 1, 2025 09:51
-
-
Save sonibla/3bd71cfe5083abcc2ad4e381c890fbc8 to your computer and use it in GitHub Desktop.
Gitea Docker compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
networks: | |
gitea: | |
external: false | |
volumes: | |
postgres: | |
driver: local | |
gitea: | |
driver: local | |
runner: | |
driver: local | |
services: | |
runner: | |
image: gitea/act_runner | |
restart: unless-stopped | |
depends_on: | |
- server | |
networks: | |
- gitea | |
volumes: | |
- 'runner:/data' | |
- '/var/run/docker.sock:/var/run/docker.sock' | |
environment: | |
- GITEA_INSTANCE_URL=http://${GITEA_INSTANCE_HOSTNAME?error}:3000 | |
- GITEA_RUNNER_REGISTRATION_TOKEN=${REGISTRATION_TOKEN?error} | |
server: | |
image: 'docker.io/gitea/gitea:latest' | |
container_name: gitea | |
environment: | |
- GITEA_RUNNER_REGISTRATION_TOKEN=${REGISTRATION_TOKEN?error} | |
- 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=${DB_PASSWORD?error} | |
restart: unless-stopped | |
networks: | |
- gitea | |
volumes: | |
- 'gitea:/data' | |
- '/etc/timezone:/etc/timezone:ro' | |
- '/etc/localtime:/etc/localtime:ro' | |
ports: | |
- '3000:3000' | |
- '2222:22' | |
depends_on: | |
- db | |
db: | |
image: 'docker.io/library/postgres:14' | |
restart: unless-stopped | |
environment: | |
- POSTGRES_USER=gitea | |
- POSTGRES_PASSWORD=${DB_PASSWORD?error} | |
- POSTGRES_DB=gitea | |
volumes: | |
- 'postgres:/var/lib/postgresql/data' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment