container-server/services/forgejo/docker-compose.yml

54 lines
1.4 KiB
YAML

version: '3.7'
# https://codeberg.org/forgejo/-/packages/container/forgejo/versions
# https://docs.gitea.io/en-us/install-with-docker/
# https://goauthentik.io/integrations/services/gitea/
# set FORGEJO_SETUP_LOCK = false for inital setup in .env
# create admin account: during setup at bottom of page
networks:
forgejo:
services:
forgejo:
image: codeberg.org/forgejo/forgejo:1.18
container_name: forgejo
restart: "${RESTART:-no}"
hostname: git
domainname: ${BASE_DOMAIN}
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=pg-forgejo
- GITEA__database__NAME=forgejo
- GITEA__database__USER=forgejo
- GITEA__database__PASSWD=${FORGEJO_PG_PWD:-forgejo}
ports:
- '${FORGEJO_SSH_PORT}:22'
volumes:
- ${BASE_DIR:-/srv}/forgejo/data:/data
- ./forgejo/app.ini:/data/gitea/conf/app.ini
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- pg-forgejo
networks:
- proxy
- mail
- forgejo
pg-forgejo:
image: postgres:${POSTGRES_VERSION}-alpine
container_name: pg-forgejo
restart: "${RESTART:-no}"
environment:
- POSTGRES_DB=forgejo
- POSTGRES_USER=forgejo
- POSTGRES_PASSWORD=${FORGEJO_PG_PWD:-forgejo}
volumes:
- ${BASE_DIR:-/srv}/forgejo/psql:/var/lib/postgresql/data
networks:
- forgejo