60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
version: '2.4'
|
|
|
|
services:
|
|
app:
|
|
# Latest contains a development version
|
|
image: 'gitea/gitea:1.14.2-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.3-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:
|