[+] Template: Gitea (PostgreSQL)
This commit is contained in:
parent
0c1991d1de
commit
4031e477ee
44
templates/compose/gitea-with-postgresql.yaml
Normal file
44
templates/compose/gitea-with-postgresql.yaml
Normal file
@ -0,0 +1,44 @@
|
||||
# documentation: https://docs.gitea.com
|
||||
# slogan: Gitea (with PostgreSQL)vis a self-hosted, lightweight Git service, offering version control, collaboration, and code hosting.
|
||||
# tags: version control, collaboration, code, hosting, lightweight, postgresql
|
||||
|
||||
services:
|
||||
gitea:
|
||||
image: gitea/gitea:latest
|
||||
environment:
|
||||
- SERVICE_FQDN_GITEA
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- GITEA__database__DB_TYPE=postgres
|
||||
- GITEA__database__HOST=postgresql
|
||||
- GITEA__database__NAME=${POSTGRESQL_DATABASE-gitea}
|
||||
- GITEA__database__USER=$SERVICE_USER_POSTGRESQL
|
||||
- GITEA__database__PASSWD=$SERVICE_PASSWORD_POSTGRESQL
|
||||
volumes:
|
||||
- gitea-data:/var/lib/gitea
|
||||
- gitea-timezone:/etc/timezone:ro
|
||||
- gitea-localtime:/etc/localtime:ro
|
||||
labels:
|
||||
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
|
||||
depends_on:
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000"]
|
||||
interval: 2s
|
||||
timeout: 10s
|
||||
retries: 15
|
||||
|
||||
postgresql:
|
||||
image: postgres:15-alpine
|
||||
volumes:
|
||||
- gitea-postgresql-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_USER=${SERVICE_USER_POSTGRESQL}
|
||||
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}
|
||||
- POSTGRES_DB=${POSTGRESQL_DATABASE}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
timeout: 20s
|
||||
retries: 10
|
Loading…
x
Reference in New Issue
Block a user