feat: initial forgejo role setup
This commit is contained in:
commit
57458b975f
13 changed files with 225 additions and 0 deletions
65
tasks/forgejo.yaml
Normal file
65
tasks/forgejo.yaml
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
|
||||
# create directories
|
||||
- name: "create forgejo directories"
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: "directory"
|
||||
owner: "1000"
|
||||
group: "1000"
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "/mnt/forgejo/data"
|
||||
|
||||
# run forgejo
|
||||
- name: "run forgejo"
|
||||
community.docker.docker_container:
|
||||
|
||||
# docker defaults
|
||||
auto_remove: "no"
|
||||
container_default_behavior: "no_defaults"
|
||||
detach: "yes"
|
||||
init: "no"
|
||||
interactive: "no"
|
||||
log_driver: "json-file"
|
||||
log_options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
memory: "0"
|
||||
paused: "no"
|
||||
privileged: "no"
|
||||
pull: "always"
|
||||
read_only: "no"
|
||||
state: "started"
|
||||
tty: "no"
|
||||
|
||||
# forgejo
|
||||
name: "forgejo"
|
||||
image: "cr.simoncor.net/dockerhub/codeberg/forgejo:v11.0.13"
|
||||
image_name_mismatch: "recreate"
|
||||
restart_policy: "unless-stopped"
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- "/mnt/forgejo/data:/data"
|
||||
|
||||
ports:
|
||||
- "3000:3000/tcp"
|
||||
|
||||
env:
|
||||
|
||||
# global
|
||||
TZ: "{{ timezone }}"
|
||||
|
||||
# server
|
||||
FORGEJO__server__DOMAIN: "git.simoncor.net"
|
||||
FORGEJO__server__ROOT_URL: "https://git.simoncor.net"
|
||||
FORGEJO__server__HTTP_PORT: "3000"
|
||||
FORGEJO__server__DISABLE_SSH: "true"
|
||||
|
||||
# database
|
||||
FORGEJO__database__DB_TYPE: "sqlite3"
|
||||
FORGEJO__database__PATH: "/data/gitea/forgejo.db"
|
||||
FORGEJO__database__SQLITE_JOURNAL_MODE: "WAL"
|
||||
|
||||
# mailer
|
||||
FORGEJO__mailer__ENABLED: "false"
|
||||
Loading…
Add table
Add a link
Reference in a new issue