All checks were successful
Deploy Ansible Pipeline / Deploy Ansible Pipeline (push) Successful in 53s
feat: licensing refactor fix: update gitignore for logs files (license check in ci) Reviewed-on: #163 Co-authored-by: GregoryDosh <authentik@gregorydosh.com> Co-committed-by: GregoryDosh <authentik@gregorydosh.com>
90 lines
3 KiB
YAML
90 lines
3 KiB
YAML
# Private Forgejo instance for managing/automating Auengun.net
|
|
# Source available at git.auengun.net/homelab/host-git
|
|
# Copyright (C) 2024 GregoryDosh
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
# SPDX-FileCopyrightText: 2024 GregoryDosh
|
|
---
|
|
services:
|
|
# The main service here is Forgejo.
|
|
forgejo:
|
|
# The image will get overridden during the ansible templating
|
|
# as it'll get combined with `DCAASS_DOCKER_COMPOSE_YAML_OVERRIDES`
|
|
# section of the `auengun.homelab.dcaass` role in `ansible-pipeline.yml`
|
|
image: codeberg.org/forgejo/forgejo:latest
|
|
container_name: forgejo
|
|
restart: unless-stopped
|
|
user: 1000:1000
|
|
volumes:
|
|
# Map the host `/forgejo` location which is managed
|
|
# configuration from the `ansible-pipeline.yml` file.
|
|
- /forgejo/forgejo:/var/lib/forgejo
|
|
|
|
# The Forgejo file is in a different location than the rest.
|
|
- /forgejo/forgejo.ini:/etc/forgejo/app.ini:ro
|
|
|
|
# Give the container access to PKI certs.
|
|
- /etc/ssl/certs:/etc/ssl/certs:ro
|
|
|
|
# Give the containers the same access to the time/timezone as the host.
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
depends_on:
|
|
- postgresql
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- HOME=/var/lib/forgejo
|
|
- WORK_PATH=/var/lib/forgejo
|
|
- GITEA_WORK_DIR=/var/lib/forgejo
|
|
- GITEA_CUSTOM=/var/lib/forgejo/custom
|
|
- GITEA_APP_INI=/etc/forgejo/app.ini
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "127.0.0.1:3000:3000"
|
|
|
|
postgresql:
|
|
# This is managed same as the other service images through DCaaSS.
|
|
image: docker.io/library/postgres:latest
|
|
container_name: postgresql
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
|
|
start_period: 20s
|
|
interval: 30s
|
|
retries: 5
|
|
timeout: 5s
|
|
volumes:
|
|
- /forgejo/postgres:/var/lib/postgresql/data
|
|
env_file:
|
|
- .env
|
|
|
|
# Better caching for expensive operations.
|
|
# https://forgejo.org/docs/latest/admin/recommendations/
|
|
redis:
|
|
image: redis:alpine
|
|
container_name: redis
|
|
command: --save 60 1 --loglevel warning
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
|
|
start_period: 20s
|
|
interval: 30s
|
|
retries: 5
|
|
timeout: 3s
|
|
volumes:
|
|
- ./redis:/data
|