removed bookstack, added wiki_js

This commit is contained in:
2023-03-29 11:59:57 +02:00
parent ed68a372b1
commit 26b8d4102e
4 changed files with 71 additions and 1 deletions

View File

@@ -16,5 +16,8 @@ all:
hosts:
10.11.12.35:
audiobookshelf_hosts:
hosts:
10.11.12.35:
wiki_js_hosts:
hosts:
10.11.12.35:

View File

@@ -39,4 +39,11 @@
become: true
roles:
- audiobookshelf
tags: audiobookshelf
tags: audiobookshelf
- name: Configure Wiki_Js
hosts: wiki_js_hosts
become: true
roles:
- wiki_js
tags: wiki_js

View 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

View 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'