mirror of
https://github.com/RealOrangeOne/infrastructure.git
synced 2026-07-17 16:35:58 +00:00
Protect forgejo with anubis
This commit is contained in:
parent
240333e368
commit
c82140c347
3 changed files with 32 additions and 4 deletions
4
ansible/roles/forgejo/files/anubis.yml
Normal file
4
ansible/roles/forgejo/files/anubis.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
bots:
|
||||
- import: (data)/meta/default-config.yaml
|
||||
- import: (data)/clients/docker-client.yaml
|
||||
- import: (data)/clients/git.yaml
|
||||
|
|
@ -21,10 +21,6 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.forgejo.rule=Host(`git.theorangeone.net`)
|
||||
- traefik.http.services.forgejo-forgejo.loadbalancer.server.port=3000
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
|
|
@ -44,6 +40,26 @@ services:
|
|||
volumes:
|
||||
- /mnt/speed/dbs/redis/gitea:/data
|
||||
|
||||
anubis:
|
||||
image: ghcr.io/techarohq/anubis:latest
|
||||
user: "{{ docker_user.id }}:{{ docker_user.id }}"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TARGET=http://forgejo:3000
|
||||
- OG_PASSTHROUGH=true
|
||||
- POLICY_FNAME=/anubis.yml
|
||||
volumes:
|
||||
- ./anubis.yml:/anubis.yml
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
depends_on:
|
||||
- forgejo
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.forgejo.rule=Host(`git.theorangeone.net`)
|
||||
- traefik.http.services.forgejo-forgejo.loadbalancer.server.port=3000
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
|
|
|
|||
|
|
@ -17,6 +17,14 @@
|
|||
validate: docker compose -f %s config
|
||||
notify: restart gitea
|
||||
|
||||
- name: Install anubis config
|
||||
template:
|
||||
src: files/anubis.yml
|
||||
dest: /opt/gitea/anubis.yml
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
notify: restart gitea
|
||||
|
||||
- name: Install config file
|
||||
template:
|
||||
src: files/app.ini
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue