This repository has been archived on 2021-12-24. You can view files and clone it, but cannot push or open issues/pull-requests.
self-hosting/gitea/docker-compose.yml

60 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2021-04-23 16:32:54 +02:00
version: '2.4'
services:
app:
# Latest contains a development version
image: 'gitea/gitea:1.14.2-rootless'
2021-04-23 16:32:54 +02:00
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:
2021-12-24 09:05:17 +01:00
image: 'postgres:14.1-alpine'
2021-04-23 16:32:54 +02:00
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: