77 lines
1.9 KiB
YAML
77 lines
1.9 KiB
YAML
services:
|
|
gitea-db:
|
|
image: postgres:16
|
|
container_name: gitea_db
|
|
restart: unless-stopped
|
|
environment:
|
|
- TZ=Europe/Berlin
|
|
- POSTGRES_USER=${GITEA_DB_USER}
|
|
- POSTGRES_PASSWORD=${GITEA_DB_PASSWORD}
|
|
- POSTGRES_DB=${GITEA_DB_NAME}
|
|
volumes:
|
|
- /srv/docker/gitea/db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${GITEA_DB_USER}"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 30s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 512M
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
gitea:
|
|
image: gitea/gitea:latest
|
|
container_name: gitea
|
|
restart: unless-stopped
|
|
environment:
|
|
- TZ=Europe/Berlin
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- GITEA__database__DB_TYPE=postgres
|
|
- GITEA__database__HOST=gitea-db:5432
|
|
- GITEA__database__NAME=${GITEA_DB_NAME}
|
|
- GITEA__database__USER=${GITEA_DB_USER}
|
|
- GITEA__database__PASSWD=${GITEA_DB_PASSWORD}
|
|
- GITEA__server__DOMAIN=gitea.thodirr.net
|
|
- GITEA__server__ROOT_URL=http://10.13.13.3:3030
|
|
- GITEA__server__SSH_DOMAIN=gitea.thodirr.net
|
|
- GITEA__server__SSH_PORT=2222
|
|
volumes:
|
|
- /srv/docker/gitea/data:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- 3030:3000
|
|
- 2222:22
|
|
depends_on:
|
|
gitea-db:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 60s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2.0'
|
|
memory: 1G
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
networks:
|
|
default:
|
|
name: gitea_net
|