Added initial gitea config
This commit is contained in:
parent
d13573f87d
commit
0a6ffbf67d
4 changed files with 111 additions and 7 deletions
16
gitea/.env.example
Normal file
16
gitea/.env.example
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# User to run container as
|
||||
USER_UID=1000
|
||||
USER_GID=1000
|
||||
|
||||
# Database settings
|
||||
DB_TYPE=postgres
|
||||
DB_HOST=db:5432
|
||||
DB_NAME=gitea
|
||||
DB_USER=gitea
|
||||
DB_PASSWD=gitea
|
||||
|
||||
# Wether to start LFS
|
||||
LFS_START_SERVER=true
|
||||
|
||||
# Wether to allow registration
|
||||
DISABLE_REGISTRATION=true
|
||||
59
gitea/docker-compose.yml
Normal file
59
gitea/docker-compose.yml
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
version: '2.4'
|
||||
|
||||
services:
|
||||
app:
|
||||
# Latest contains a development version
|
||||
image: 'gitea/gitea:1.14.1-rootless'
|
||||
restart: 'always'
|
||||
|
||||
depends_on:
|
||||
db:
|
||||
condition: 'service_healthy'
|
||||
healthcheck:
|
||||
test: 'curl -f localhost:3000 || exit 1'
|
||||
interval: '30s'
|
||||
timeout: '5s'
|
||||
retries: 3
|
||||
start_period: '5s'
|
||||
|
||||
env_file:
|
||||
- '.env'
|
||||
networks:
|
||||
- 'default'
|
||||
- 'nginx'
|
||||
ports:
|
||||
- '22:22'
|
||||
volumes:
|
||||
- 'data:/data'
|
||||
- 'repos:/data/git/repositories'
|
||||
- 'lfs:/data/git/lfs'
|
||||
- '/etc/timezone:/etc/timezone:ro'
|
||||
- '/etc/localtime:/etc/localtime:ro'
|
||||
|
||||
db:
|
||||
image: 'postgres:13.2-alpine'
|
||||
restart: 'always'
|
||||
|
||||
healthcheck:
|
||||
test: 'pg_isready -U gitea'
|
||||
interval: '30s'
|
||||
timeout: '5s'
|
||||
retries: 3
|
||||
start_period: '0s'
|
||||
|
||||
environment:
|
||||
- 'POSTGRES_USER=gitea'
|
||||
- 'POSTGRES_PASSWORD=gitea'
|
||||
- 'POSTGRES_DB=gitea'
|
||||
volumes:
|
||||
- 'db-data:/var/lib/postgresql/data'
|
||||
|
||||
networks:
|
||||
nginx:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
data:
|
||||
lfs:
|
||||
db-data:
|
||||
repos:
|
||||
Reference in a new issue