66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
services:
|
|
gitea:
|
|
image: docker.gitea.com/gitea:1.27.3
|
|
container_name: gitea
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
USER_UID: "1000"
|
|
USER_GID: "1000"
|
|
|
|
GITEA__database__DB_TYPE: postgres
|
|
GITEA__database__HOST: db:5432
|
|
GITEA__database__NAME: gitea
|
|
GITEA__database__USER: gitea
|
|
GITEA__database__PASSWD: change-this-password
|
|
|
|
GITEA__server__DOMAIN: localhost
|
|
GITEA__server__ROOT_URL: http://localhost:3003/
|
|
GITEA__server__SSH_DOMAIN: localhost
|
|
GITEA__server__SSH_PORT: "2222"
|
|
|
|
ports:
|
|
- "3003:3000"
|
|
- "2222:22"
|
|
|
|
volumes:
|
|
- gitea-data:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
networks:
|
|
- gitea
|
|
|
|
db:
|
|
image: postgres:16
|
|
container_name: gitea-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: gitea
|
|
POSTGRES_USER: gitea
|
|
POSTGRES_PASSWORD: change-this-password
|
|
|
|
ports:
|
|
- "5433:5432"
|
|
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U gitea -d gitea"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
networks:
|
|
- gitea
|
|
|
|
networks:
|
|
gitea:
|
|
|
|
volumes:
|
|
gitea-data:
|
|
postgres-data:
|