MasterpieceDockerCompose/gitea/docker-compose.yml

37 lines
1.0 KiB
YAML

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_WEBUI_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: # se modificate la porta dell'interfaccia web, ricordatevi di cambiarla anche qua sotto
test: ["CMD", "curl", "-Ssf", http://localhost:3000"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 1m