Add gitea
This commit is contained in:
42
gitea/compose.yaml
Normal file
42
gitea/compose.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
services:
|
||||||
|
gitea_db:
|
||||||
|
image: docker.io/library/postgres:17.5
|
||||||
|
container_name: gitea_db
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
- POSTGRES_DB=${POSTGRES_DB}
|
||||||
|
volumes:
|
||||||
|
- ${APPDATA_PATH}/forgejo/db:/var/lib/postgresql/data
|
||||||
|
ports:
|
||||||
|
- ${DB_PORT}:5432
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -d postgres -U ${POSTGRES_USER}"]
|
||||||
|
start_period: 20s
|
||||||
|
interval: 30s
|
||||||
|
retries: 5
|
||||||
|
timeout: 5s
|
||||||
|
|
||||||
|
gitea_server:
|
||||||
|
image: docker.io/gitea/gitea:1.24.2-rootless
|
||||||
|
container_name: gitea_server
|
||||||
|
depends_on:
|
||||||
|
gitea_db:
|
||||||
|
condition: service_healthy
|
||||||
|
user: ${PUID}:${PGID}
|
||||||
|
environment:
|
||||||
|
- GITEA__database__DB_TYPE=postgres
|
||||||
|
- GITEA__database__HOST=gitea_db:5432
|
||||||
|
- GITEA__database__NAME=${POSTGRES_DB}
|
||||||
|
- GITEA__database__USER=${POSTGRES_USER}
|
||||||
|
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- ${APPDATA_PATH}/gitea/config:/etc/gitea
|
||||||
|
- ${APPDATA_PATH}/gitea/data:/var/lib/gitea
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
ports:
|
||||||
|
- ${SERVER_PORT}:3000
|
||||||
|
- ${SSH_PORT}:22
|
||||||
|
restart: unless-stopped
|
Reference in New Issue
Block a user