mirror of
https://git.local.zernis.ch/simon/homeserver.zernis.ch.git
synced 2025-12-15 20:49:40 +01:00
removed bookstack, added wiki_js
This commit is contained in:
@@ -18,3 +18,6 @@ all:
|
|||||||
audiobookshelf_hosts:
|
audiobookshelf_hosts:
|
||||||
hosts:
|
hosts:
|
||||||
10.11.12.35:
|
10.11.12.35:
|
||||||
|
wiki_js_hosts:
|
||||||
|
hosts:
|
||||||
|
10.11.12.35:
|
||||||
7
main.yml
7
main.yml
@@ -40,3 +40,10 @@
|
|||||||
roles:
|
roles:
|
||||||
- audiobookshelf
|
- audiobookshelf
|
||||||
tags: audiobookshelf
|
tags: audiobookshelf
|
||||||
|
|
||||||
|
- name: Configure Wiki_Js
|
||||||
|
hosts: wiki_js_hosts
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- wiki_js
|
||||||
|
tags: wiki_js
|
||||||
51
roles/wiki_js/tasks/main.yml
Normal file
51
roles/wiki_js/tasks/main.yml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
- name: Create Wiki_JS directories they do not exist
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /home/{{ user['name'] }}/docker/wiki_js/{{ item }}
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
loop: '{{ wiki_js_folder }}'
|
||||||
|
|
||||||
|
- name: Create docker network 'wiki_js_internal'
|
||||||
|
community.docker.docker_network:
|
||||||
|
name: wiki_js_internal
|
||||||
|
|
||||||
|
- name: Create docker network 'proxy'
|
||||||
|
community.docker.docker_network:
|
||||||
|
name: proxy
|
||||||
|
|
||||||
|
- name: Create wiki_js DB Container
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: wiki_js_db
|
||||||
|
image: 'postgres:11-alpine'
|
||||||
|
state: started
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: "{{ WIKI_JS_POSTGRES_DB | string }}"
|
||||||
|
POSTGRES_USER: "{{ WIKI_JS_POSTGRES_USER | string }}"
|
||||||
|
POSTGRES_PASSWORD: "{{ WIKI_JS_POSTGRES_PASS | string }}"
|
||||||
|
volumes:
|
||||||
|
- /home/{{ user['name'] }}/docker/wiki_js/db:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- name: wiki_js_internal
|
||||||
|
|
||||||
|
- name: Create Wiki_JS Container
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: wiki_js_app
|
||||||
|
image: 'ghcr.io/requarks/wiki:2'
|
||||||
|
pull: yes
|
||||||
|
state: started
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
ports:
|
||||||
|
- '11003:3000'
|
||||||
|
env:
|
||||||
|
DB_TYPE: "{{ WIKI_JS_DB_TYPE | string}}"
|
||||||
|
DB_HOST: "{{ WIKI_JS_DB_HOST | string}}"
|
||||||
|
DB_PORT: "{{ WIKI_JS_DB_PORT | string }}"
|
||||||
|
DB_USER: "{{ WIKI_JS_POSTGRES_USER | string }}"
|
||||||
|
DB_PASS: "{{ WIKI_JS_POSTGRES_PASS | string }}"
|
||||||
|
DB_NAME: "{{ WIKI_JS_POSTGRES_DB | string }}"
|
||||||
|
networks:
|
||||||
|
- name: wiki_js_internal
|
||||||
|
- name: proxy
|
||||||
9
roles/wiki_js/vars/main.yml
Normal file
9
roles/wiki_js/vars/main.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
wiki_js_folder:
|
||||||
|
- db
|
||||||
|
|
||||||
|
WIKI_JS_DB_TYPE: 'postgres'
|
||||||
|
WIKI_JS_DB_HOST: 'wiki_js_db'
|
||||||
|
WIKI_JS_DB_PORT: '5432'
|
||||||
|
WIKI_JS_POSTGRES_DB: 'wiki'
|
||||||
|
WIKI_JS_POSTGRES_USER: 'wiki'
|
||||||
|
WIKI_JS_POSTGRES_PASS: 'XwnYnsa&b5s5ner8wh6bNZEC&K5aNnBh'
|
||||||
Reference in New Issue
Block a user