feat: adds forgejo service with runners
This commit is contained in:
44
templates/compose/forgejo-with-postgresql.yaml
Normal file
44
templates/compose/forgejo-with-postgresql.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
# documentation: https://forgejo.org/docs
|
||||
# slogan: Forgejo is a self-hosted lightweight software forge. Easy to install and low maintenance, it just does the job.
|
||||
# tags: version control, collaboration, code, hosting, lightweight, postgresql
|
||||
# logo: svgs/forgejo.svg
|
||||
|
||||
services:
|
||||
forgejo:
|
||||
image: codeberg.org/forgejo/forgejo:7
|
||||
environment:
|
||||
- USER_UID=1000
|
||||
- USER_GID=1000
|
||||
- DB_TYPE=postgres
|
||||
- HOST=postgresql
|
||||
- NAME=${POSTGRESQL_DATABASE-forgejo}
|
||||
- USER=$SERVICE_USER_POSTGRESQL
|
||||
- PASSWD=$SERVICE_PASSWORD_POSTGRESQL
|
||||
volumes:
|
||||
- forgejo-data:/data
|
||||
- forgejo-timezone:/etc/timezone:ro
|
||||
- forgejo-localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- 22222:22
|
||||
depends_on:
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000"]
|
||||
interval: 2s
|
||||
timeout: 10s
|
||||
retries: 15
|
||||
|
||||
postgresql:
|
||||
image: postgres:16-alpine
|
||||
volumes:
|
||||
- forgejo-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
|
||||
Reference in New Issue
Block a user