48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
version: "3.8"
|
|
services:
|
|
db:
|
|
container_name: gitea-db
|
|
image: postgres:13-alpine
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
networks:
|
|
- custom-bridge
|
|
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
|
|
|
|
gitea:
|
|
container_name: gitea
|
|
image: gitea/gitea:1.15
|
|
networks:
|
|
- custom-bridge
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- ${GITEA_WEBUI_PORT:-3000}:3000
|
|
- ${GITEA_SSH_PORT:-22}:22
|
|
env_file: .env
|
|
volumes:
|
|
- ${POSTGRES_DATA:-/home/docker/gitea/data}:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-Ssf", http://localhost:3000"]
|
|
interval: 1m30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 1m
|
|
|
|
networks:
|
|
custom-bridge:
|
|
name: custom-bridge
|
|
driver: bridge |