chore: add configuration recipes

This commit is contained in:
2023-12-18 16:38:29 +02:00
parent 93793b6424
commit 28589cb122
50 changed files with 1214 additions and 42 deletions

View File

@ -0,0 +1,8 @@
# Distributed manual
1. Create user `demo` with password from `AHRIMAN_PASSWORD` environment variable.
2. Setup repository named `ahriman-demo` with architecture `x86_64`.
3. Start web server at port `8080`.
4. Start service in daemon mode with periodic (once per day) repository update.
5. All updates from worker daemon instance are uploaded to the web service.
6. Repository is available at `http://localhost:8080/repo`.

View File

@ -0,0 +1,77 @@
services:
backend:
image: arcan1s/ahriman:edge
privileged: true
environment:
AHRIMAN_DEBUG: yes
AHRIMAN_OUTPUT: console
AHRIMAN_PASSWORD: ${AHRIMAN_PASSWORD}
AHRIMAN_PORT: 8080
AHRIMAN_PRESETUP_COMMAND: (cat /run/secrets/password; echo; cat /run/secrets/password) | sudo -u ahriman ahriman user-add demo -R full
AHRIMAN_REPOSITORY: ahriman-demo
AHRIMAN_UNIX_SOCKET: /var/lib/ahriman/ahriman/ahriman.sock
configs:
- source: service
target: /etc/ahriman.ini.d/99-settings.ini
secrets:
- password
volumes:
- type: volume
source: repository
target: /var/lib/ahriman
volume:
nocopy: true
command: web
frontend:
image: nginx
ports:
- 8080:80
configs:
- source: nginx
target: /etc/nginx/conf.d/default.conf
volumes:
- type: volume
source: repository
target: /srv
read_only: true
volume:
nocopy: true
worker:
image: arcan1s/ahriman:edge
privileged: true
environment:
AHRIMAN_DEBUG: yes
AHRIMAN_OUTPUT: console
AHRIMAN_PASSWORD: ${AHRIMAN_PASSWORD}
AHRIMAN_REPOSITORY: ahriman-demo
AHRIMAN_REPOSITORY_SERVER: http://frontend/repo/$$repo/$$arch
configs:
- source: worker
target: /etc/ahriman.ini.d/99-settings.ini
command: daemon
configs:
nginx:
file: nginx.conf
service:
file: service.ini
worker:
file: worker.ini
secrets:
password:
environment: AHRIMAN_PASSWORD
volumes:
repository:

View File

@ -0,0 +1,18 @@
server {
listen 80;
location /repo {
rewrite ^/repo/(.*) /$1 break;
autoindex on;
root /srv/ahriman/repository;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarder-Proto $scheme;
proxy_pass http://backend:8080;
}
}

View File

@ -0,0 +1,6 @@
[auth]
target = mapping
[web]
enable_archive_upload = yes
wait_timeout = 0

View File

@ -0,0 +1,19 @@
[build]
triggers = ahriman.core.gitremote.RemotePullTrigger ahriman.core.upload.UploadTrigger ahriman.core.report.ReportTrigger ahriman.core.gitremote.RemotePushTrigger
[status]
address = http://backend:8080
username = demo
password = $AHRIMAN_PASSWORD
[report]
target = remote-call
[remote-call]
manual = yes
wait_timeout = 0
[upload]
target = remote-service
[remote-service]