MasterpieceDockerCompose/gitea/docker-compose.yml

48 lines
1.1 KiB
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
2022-01-27 11:05:44 +01:00
security_opt:
- no-new-privileges:true
networks:
- custom-bridge
2021-05-17 09:57:45 +02:00
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
2021-08-19 15:55:35 +02:00
gitea:
2021-05-17 09:57:45 +02:00
container_name: gitea
2022-02-18 16:38:07 +01:00
image: gitea/gitea:1.16
networks:
- custom-bridge
2021-05-17 09:57:45 +02:00
restart: unless-stopped
depends_on:
- db
ports:
2021-05-17 12:45:18 +02:00
- ${GITEA_WEBUI_PORT:-3000}:3000
2021-08-19 15:55:35 +02:00
- ${GITEA_SSH_PORT:-22}:22
2021-05-17 09:57:45 +02:00
env_file: .env
volumes:
- ${POSTGRES_DATA:-/home/docker/gitea/data}:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
healthcheck:
2021-05-17 12:45:18 +02:00
test: ["CMD", "curl", "-Ssf", http://localhost:3000"]
interval: 1m30s
2021-05-17 09:57:45 +02:00
timeout: 10s
retries: 3
start_period: 1m
networks:
custom-bridge:
name: custom-bridge
driver: bridge