Compare commits
3 commits
689fbd3986
...
db38d9c6bb
Author | SHA1 | Date | |
---|---|---|---|
db38d9c6bb | |||
c59dcbeaae | |||
6b126e3baa |
7 changed files with 44 additions and 7 deletions
|
@ -17,7 +17,17 @@
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- setup_apt
|
- setup_apt
|
||||||
- docker
|
|
||||||
|
post_tasks:
|
||||||
|
- name: Install Docker
|
||||||
|
include_role:
|
||||||
|
name: docker
|
||||||
|
vars:
|
||||||
|
docker_daemon_config:
|
||||||
|
log-driver: fluentd
|
||||||
|
log-opts:
|
||||||
|
fluentd-address: "localhost:22222"
|
||||||
|
tag: "docker.{{ '{{' }}.Name{{ '}}' }}"
|
||||||
|
|
||||||
- name: Setup Docker Swarm manager
|
- name: Setup Docker Swarm manager
|
||||||
hosts: manager
|
hosts: manager
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
APP_NAME = Forgejo: Beyond coding. We forge.
|
APP_NAME = Forgejo: Beyond coding. We forge.
|
||||||
RUN_MODE = prod
|
RUN_MODE = prod
|
||||||
RUN_USER = git
|
RUN_USER = git
|
||||||
|
WORK_PATH=/data/gitea
|
||||||
|
|
||||||
[repository]
|
[repository]
|
||||||
ROOT = /data/git/repositories
|
ROOT = /data/git/repositories
|
||||||
|
@ -56,8 +57,9 @@ PATH = /data/gitea/attachments
|
||||||
[log]
|
[log]
|
||||||
MODE = console
|
MODE = console
|
||||||
LEVEL = info
|
LEVEL = info
|
||||||
ROUTER = console
|
logger.router.MODE = console
|
||||||
ROOT_PATH = /data/gitea/log
|
ROOT_PATH = /data/gitea/log
|
||||||
|
logger.access.MODE=console
|
||||||
|
|
||||||
[security]
|
[security]
|
||||||
INSTALL_LOCK = true
|
INSTALL_LOCK = true
|
||||||
|
@ -102,3 +104,6 @@ DEFAULT_TRUST_MODEL = committer
|
||||||
|
|
||||||
[ui]
|
[ui]
|
||||||
DEFAULT_THEME = forgejo-light
|
DEFAULT_THEME = forgejo-light
|
||||||
|
|
||||||
|
[oauth2]
|
||||||
|
ENABLE=false
|
||||||
|
|
|
@ -19,7 +19,7 @@ volumes:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
forgejo:
|
forgejo:
|
||||||
image: codeberg.org/forgejo/forgejo:1.18
|
image: codeberg.org/forgejo/forgejo:1.20
|
||||||
environment:
|
environment:
|
||||||
- USER_UID=1000
|
- USER_UID=1000
|
||||||
- USER_GID=1000
|
- USER_GID=1000
|
||||||
|
|
|
@ -122,7 +122,7 @@ services:
|
||||||
- BAUTH_PASS=test
|
- BAUTH_PASS=test
|
||||||
|
|
||||||
fluentd:
|
fluentd:
|
||||||
image: git.kun.is/pim/fluentd:1.0.1
|
image: git.kun.is/pim/fluentd:1.0.2
|
||||||
depends_on:
|
depends_on:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
port {{ fluent_forward_port }}
|
port {{ fluent_forward_port }}
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
<match *>
|
<match **>
|
||||||
@type elasticsearch
|
@type elasticsearch
|
||||||
host maestro.dmz
|
host maestro.dmz
|
||||||
port {{ elasticsearch_port }}
|
port {{ elasticsearch_port }}
|
||||||
|
|
|
@ -19,7 +19,7 @@ volumes:
|
||||||
device: ":/mnt/data/seafile/db"
|
device: ":/mnt/data/seafile/db"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mariadb:
|
db:
|
||||||
image: mariadb:10.5
|
image: mariadb:10.5
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD={{ db_root_passwd }}
|
- MYSQL_ROOT_PASSWORD={{ db_root_passwd }}
|
||||||
|
@ -48,7 +48,7 @@ services:
|
||||||
volume:
|
volume:
|
||||||
nocopy: true
|
nocopy: true
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=db
|
- DB_HOST=db
|
||||||
- DB_ROOT_PASSWD={{ db_root_passwd }}
|
- DB_ROOT_PASSWD={{ db_root_passwd }}
|
||||||
- TIME_ZONE=Europe/Amsterdam
|
- TIME_ZONE=Europe/Amsterdam
|
||||||
- SEAFILE_ADMIN_EMAIL={{ seafile_admin_email }}
|
- SEAFILE_ADMIN_EMAIL={{ seafile_admin_email }}
|
||||||
|
|
|
@ -38,3 +38,25 @@ resource "elasticstack_elasticsearch_index_template" "metrics_template" {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "elasticstack_elasticsearch_index_lifecycle" "logs_ilm" {
|
||||||
|
name = "logs_ilm"
|
||||||
|
|
||||||
|
delete {
|
||||||
|
min_age = "2d"
|
||||||
|
delete {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "elasticstack_elasticsearch_index_template" "logs_template" {
|
||||||
|
name = "logs_template"
|
||||||
|
|
||||||
|
priority = 42
|
||||||
|
index_patterns = ["fluentd.docker.**"]
|
||||||
|
|
||||||
|
template {
|
||||||
|
settings = jsonencode({
|
||||||
|
"index.lifecycle.name" = elasticstack_elasticsearch_index_lifecycle.logs_ilm.name
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Reference in a new issue