88 lines
2.3 KiB
YAML
88 lines
2.3 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
backup-cron-gitea:
|
|
build:
|
|
context: .
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- .s3cfg:/root/.s3cfg:ro
|
|
- ./backup.sh:/usr/local/bin/backup.sh:ro
|
|
restart: unless-stopped
|
|
networks:
|
|
- gitea
|
|
depends_on:
|
|
- gitea
|
|
|
|
gitea:
|
|
image: gitea/gitea:1.22.1
|
|
container_name: gitea
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
- GITEA__security__SECRET=${GITEA_SECRET}
|
|
- GITEA__security__INTERNAL_TOKEN=${GITEA_TOKEN}
|
|
- GITEA__security__ENFORCE_TWO_FACTOR_AUTH=true
|
|
- GITEA__database__DB_TYPE=${DB_TYPE}
|
|
- GITEA__database__HOST=database:5432
|
|
- GITEA__database__NAME=${DB_DATABASE}
|
|
- GITEA__database__USER=${DB_USER}
|
|
- GITEA__database__PASSWD=${DB_PASSWORD}
|
|
- GITEA__mailer__ENABLED=true
|
|
- GITEA__mailer__FROM=${SMTP_FROM}
|
|
- GITEA__mailer__PROTOCOL=smtps
|
|
- GITEA__mailer__SMTP_ADDR=${SMTP_HOST}
|
|
- GITEA__mailer__SMTP_PORT=${SMTP_PORT}
|
|
- GITEA__mailer__USER=${SMTP_USER}
|
|
- GITEA__mailer__PASSWD=${SMTP_PASSWORD}
|
|
- GITEA__server__LFS_START_SERVER=${GITEA_LFS_ENABLE}
|
|
- GITEA__server__ROOT_URL=${GITEA_ROOT_URL}
|
|
- GITEA__server__DOMAIN=${GITEA_HOST}
|
|
- GITEA__server__DISABLE_HTTP_GIT=${GITEA_DISABLE_HTTP_GIT}
|
|
- GITEA__server__SSH_DOMAIN=${GITEA_SSH_HOST}
|
|
depends_on:
|
|
- database
|
|
restart: always
|
|
networks:
|
|
- gitea
|
|
- nginx-network
|
|
volumes:
|
|
- ./gitea/data:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
- "3000:3000"
|
|
- "222:22"
|
|
|
|
database:
|
|
image: postgres:16.4
|
|
restart: always
|
|
networks:
|
|
- gitea
|
|
environment:
|
|
- POSTGRES_DB=${DB_DATABASE}
|
|
- POSTGRES_USER=${DB_USER}
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
|
volumes:
|
|
- ./postgres/data:/var/lib/postgresql/data
|
|
|
|
runner_A0:
|
|
image: gitea/act_runner
|
|
restart: always
|
|
networks:
|
|
- gitea
|
|
environment:
|
|
- GITEA_INSTANCE_URL=https://git.openharbor.io
|
|
- GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_A0_REGISTRATION_TOKEN}
|
|
- GITEA_RUNNER_NAME=A0
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
networks:
|
|
gitea:
|
|
driver: bridge
|
|
nginx-network:
|
|
external: true
|