MasterpieceDockerCompose/gitea/docker-compose.yml

37 lines
995 B
YAML
Raw Normal View History

2021-05-17 09:57:45 +02:00
version: "3.8"
services:
db:
container_name: gitea-db
image: postgres:13-alpine
restart: always
env_file: .env
volumes:
- ${POSTGRES_DATA:-/home/docker/gitea/db}:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["CMD", "pg_isready", "-U", "gitea"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 10s
git:
container_name: gitea
image: gitea/gitea:1.14.2
restart: unless-stopped
depends_on:
- db
ports:
- ${GITEA_HTTP_PORT:-3000}:3000
- ${GITEA_SSH_PORT:-221}:22
env_file: .env
volumes:
- ${POSTGRES_DATA:-/home/docker/gitea/data}:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
healthcheck:
test: ["curl --silent --fail http://localhost:${GITEA_HTTP_PORT:-3000} || exit 1"]
interval: 20s
timeout: 10s
retries: 3
start_period: 10s