chore: add index page recipe

This commit is contained in:
Evgenii Alekseev 2024-01-05 12:34:55 +02:00
parent 56e97040d6
commit 6085e88f5e
5 changed files with 70 additions and 0 deletions

View File

@ -9,6 +9,7 @@ Collection of the examples of docker compose configuration files, which covers s
* [Distributed](distributed): cluster of three nodes, one with web interface and two workers which are responsible for build process. * [Distributed](distributed): cluster of three nodes, one with web interface and two workers which are responsible for build process.
* [Distributed manual](distributed-manual): same as [distributed](distributed), but two nodes and update process must be run on worker node manually. * [Distributed manual](distributed-manual): same as [distributed](distributed), but two nodes and update process must be run on worker node manually.
* [i686](i686): non-x86_64 architecture setup. * [i686](i686): non-x86_64 architecture setup.
* [Index](index): repository with index page generator enabled.
* [Multi repo](multirepo): run web service with two separated repositories. * [Multi repo](multirepo): run web service with two separated repositories.
* [OAuth](oauth): web service with OAuth (GitHub provider) authentication enabled. * [OAuth](oauth): web service with OAuth (GitHub provider) authentication enabled.
* [Pull](pull): normal service, but in addition with pulling packages from another source (e.g. GitHub repository). * [Pull](pull): normal service, but in addition with pulling packages from another source (e.g. GitHub repository).

6
recipes/index/README.md Normal file
View File

@ -0,0 +1,6 @@
# Index
1. Setup repository named `ahriman-demo` with architecture `x86_64`.
2. Generate index page.
3. Repository is available at `http://localhost:8080/repo`.
4. Index page is available at `http://localhost:8080/repo/ahriman-demo/x86_64/index.html`

48
recipes/index/compose.yml Normal file
View File

@ -0,0 +1,48 @@
services:
backend:
image: arcan1s/ahriman:edge
privileged: true
environment:
AHRIMAN_DEBUG: yes
AHRIMAN_OUTPUT: console
AHRIMAN_REPOSITORY: ahriman-demo
configs:
- source: service
target: /etc/ahriman.ini.d/99-settings.ini
volumes:
- type: volume
source: repository
target: /var/lib/ahriman
volume:
nocopy: true
command: repo-report
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
configs:
nginx:
file: nginx.conf
service:
file: service.ini
volumes:
repository:

9
recipes/index/nginx.conf Normal file
View File

@ -0,0 +1,9 @@
server {
listen 80;
location /repo {
rewrite ^/repo/(.*) /$1 break;
autoindex on;
root /srv/ahriman/repository;
}
}

View File

@ -0,0 +1,6 @@
[report]
target = html
[html]
path = /var/lib/ahriman/ahriman/repository/ahriman-demo/x86_64/index.html
link_path = http://localhost:8080/repo/ahriman-demo/x86_64