156 lines
3.8 KiB
YAML
156 lines
3.8 KiB
YAML
version: "3"
|
|
|
|
x-backend:
|
|
&backend
|
|
image: git.dergrimm.net/dergrimm/gitea_pages_backend:latest
|
|
build:
|
|
context: ./backend
|
|
restart: always
|
|
environment:
|
|
PAGES_DB_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_USER}
|
|
PAGES_AMQP_URL: amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@rabbitmq:5672
|
|
PAGES_USER: ${PAGES_USER}
|
|
PAGES_PASSWORD: ${PAGES_PASSWORD}
|
|
PAGES_GITEA_URL: ${PAGES_GITEA_URL}
|
|
PAGES_GITEA_API_TOKEN: ${PAGES_GITEA_API_TOKEN}
|
|
PAGES_GITEA_SECRET: ${PAGES_GITEA_SECRET}
|
|
PAGES_GITEA_PULL_URL: ${PAGES_GITEA_PULL_URL}
|
|
PAGES_GITEA_PULL_BRANCH: ${PAGES_GITEA_PULL_BRANCH}
|
|
PAGES_NGINX_CONFIG_DIR: ${PAGES_NGINX_CONFIG_DIR}
|
|
PAGES_REPOS_DIR: ${PAGES_REPOS_DIR}
|
|
PAGES_DOMAIN: ${PAGES_DOMAIN}
|
|
|
|
services:
|
|
nginx:
|
|
image: docker.io/byjg/nginx-extras:1.23
|
|
restart: always
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- nginx-config:/opt/nginx-config:ro
|
|
- repos:/var/www/repos:ro
|
|
ports:
|
|
- 80:80
|
|
- 81:81
|
|
- 8080:8080
|
|
depends_on:
|
|
- api
|
|
- adminer
|
|
- rabbitmq
|
|
|
|
db:
|
|
image: docker.io/postgres:15-alpine
|
|
restart: always
|
|
environment:
|
|
TZ: Europe/Berlin
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- db:/var/lib/postgresql/data
|
|
|
|
# pgbackups:
|
|
# image: docker.io/prodrigestivill/postgres-backup-local:15-alpine
|
|
# restart: always
|
|
# user: postgres:postgres
|
|
# volumes:
|
|
# - pgbackups:/backups
|
|
# links:
|
|
# - db
|
|
# depends_on:
|
|
# - db
|
|
# environment:
|
|
# POSTGRES_HOST: db
|
|
# POSTGRES_DB: ${POSTGRES_USER}
|
|
# POSTGRES_USER: ${POSTGRES_USER}
|
|
# POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
# POSTGRES_EXTRA_OPTS: "-Z6 --schema=public --blobs"
|
|
# SCHEDULE: "@daily"
|
|
# BACKUP_KEEP_DAYS: 7
|
|
# BACKUP_KEEP_WEEKS: 4
|
|
# BACKUP_KEEP_MONTHS: 6
|
|
|
|
adminer:
|
|
image: docker.io/adminer:standalone
|
|
restart: always
|
|
volumes:
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
depends_on:
|
|
- db
|
|
|
|
rabbitmq:
|
|
image: docker.io/rabbitmq:3-management-alpine
|
|
restart: always
|
|
environment:
|
|
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
|
|
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}
|
|
volumes:
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- rabbitmq:/var/lib/rabbitmq
|
|
|
|
migration_runner:
|
|
<<: *backend
|
|
command: ./migrate.sh
|
|
depends_on:
|
|
- db
|
|
|
|
worker:
|
|
<<: *backend
|
|
command: ./run.sh worker
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
- nginx-config:/opt/nginx-config
|
|
- repos:/data/repos
|
|
depends_on:
|
|
- db
|
|
- rabbitmq
|
|
- migration_runner
|
|
|
|
beat:
|
|
<<: *backend
|
|
command: ./run.sh beat
|
|
volumes:
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
depends_on:
|
|
- db
|
|
- rabbitmq
|
|
- worker
|
|
- migration_runner
|
|
|
|
api:
|
|
<<: *backend
|
|
command: ./run.sh api
|
|
volumes:
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
depends_on:
|
|
- db
|
|
- rabbitmq
|
|
- worker
|
|
- migration_runner
|
|
|
|
frontend:
|
|
image: git.dergrimm.net/dergrimm/gitea_pages_frontend:latest
|
|
build:
|
|
context: ./frontend
|
|
restart: always
|
|
volumes:
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
depends_on:
|
|
- api
|
|
|
|
volumes:
|
|
nginx-config:
|
|
db: # pgbackups:
|
|
|
|
rabbitmq:
|
|
repos:
|