Add more service databases to terraform

This commit is contained in:
Tobias Reisinger 2024-09-28 02:59:34 +02:00
parent 43baf205dc
commit ad2d3c6c06
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
9 changed files with 39 additions and 22 deletions

View file

@ -16,7 +16,7 @@
- role: acme_dns - role: acme_dns
tags: [acme-dns, certificates] tags: [acme-dns, acme_dns, certificates]
- role: authentik - role: authentik
tags: [authentik, authentication] tags: [authentik, authentication]
- role: coder - role: coder
@ -72,6 +72,6 @@
- role: webhook - role: webhook
tags: [webhook] tags: [webhook]
- role: wiki_js - role: wiki_js
tags: [wiki-js] tags: [wiki-js, wiki_js, wiki]
- role: woodpecker - role: woodpecker
tags: [woodpecker, ci, development] tags: [woodpecker, ci, development]

View file

@ -10,8 +10,8 @@ acme_dns_svc:
db: db:
host: "{{ postgres.host }}" host: "{{ postgres.host }}"
port: "{{ postgres.port }}" port: "{{ postgres.port }}"
user: "{{ vault_acmedns.db.user }}" user: "{{ opentofu.postgresql_service_roles.acme_dns.name }}"
pass: "{{ vault_acmedns.db.pass }}" pass: "{{ opentofu.postgresql_service_roles.acme_dns.password }}"
db: acme_dns db: acme_dns
acme_dns_compose: acme_dns_compose:

View file

@ -3,5 +3,4 @@ FROM ubuntu
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
RUN apt update -y \ RUN apt update -y \
&& apt install -y curl dnsutils msmtp gettext-base python3-pip python3-requests \ && apt install -y curl dnsutils msmtp gettext-base python3-matrix-nio python3-requests
&& pip install matrix-nio

View file

@ -1,7 +1,7 @@
--- ---
- name: Copy the docker-compose file - name: Template the docker-compose file
ansible.builtin.copy: ansible.builtin.template:
src: docker-compose.yml src: docker-compose.yml.j2
dest: "{{ (service_path, 'docker-compose.yml') | path_join }}" dest: "{{ (service_path, 'docker-compose.yml') | path_join }}"
mode: "0644" mode: "0644"
- name: Copy the Dockerfile - name: Copy the Dockerfile

View file

@ -1,5 +1,3 @@
version: "3.7"
x-common-elements: x-common-elements:
&common-elements &common-elements
build: build:

View file

@ -7,8 +7,8 @@ tinytinyrss_svc:
host: "{{ postgres.host }}" host: "{{ postgres.host }}"
port: "{{ postgres.port }}" port: "{{ postgres.port }}"
database: tinytinyrss database: tinytinyrss
user: "{{ vault_tinytinyrss.db.user }}" user: "{{ opentofu.postgresql_service_roles.tinytinyrss.name }}"
pass: "{{ vault_tinytinyrss.db.pass }}" pass: "{{ opentofu.postgresql_service_roles.tinytinyrss.password }}"
tinytinyrss_env: tinytinyrss_env:
TTRSS_DB_TYPE: pgsql TTRSS_DB_TYPE: pgsql

View file

@ -1,7 +1,7 @@
--- ---
umami_db_host: "{{ postgres.host }}" umami_db_host: "{{ postgres.host }}"
umami_db_user: "{{ vault_umami.db.user }}" umami_db_user: "{{ opentofu.postgresql_service_roles.umami.name }}"
umami_db_pass: "{{ vault_umami.db.pass }}" umami_db_pass: "{{ opentofu.postgresql_service_roles.umami.password }}"
umami_db_database: umami umami_db_database: umami
umami_hash_salt: "{{ vault_umami.hash_salt }}" umami_hash_salt: "{{ vault_umami.hash_salt }}"

View file

@ -8,9 +8,9 @@ wiki_js_svc:
db: db:
host: "{{ postgres.host }}" host: "{{ postgres.host }}"
port: "{{ postgres.port }}" port: "{{ postgres.port }}"
user: "{{ vault_wiki_js.db.user }}" user: "{{ opentofu.postgresql_service_roles.wiki_js.name }}"
pass: "{{ vault_wiki_js.db.pass }}" pass: "{{ opentofu.postgresql_service_roles.wiki_js.password }}"
name: wikijs name: wiki_js
wiki_js_env: wiki_js_env:
DB_TYPE: postgres DB_TYPE: postgres

View file

@ -1,12 +1,32 @@
services = { services = {
"linkwarden" = { "acme_dns" = {
name = "linkwarden" name = "acme_dns"
bucket = true bucket = false
database = true database = true
}, },
"forgejo" = { "forgejo" = {
name = "forgejo" name = "forgejo"
bucket = true bucket = true
database = true database = true
} },
"linkwarden" = {
name = "linkwarden"
bucket = true
database = true
},
"tinytinyrss" = {
name = "tinytinyrss"
bucket = false
database = true
},
"umami" = {
name = "umami"
bucket = false
database = true
},
"wiki_js" = {
name = "wiki_js"
bucket = false
database = true
},
} }