diff --git a/.gitignore b/.gitignore index 1a0ffeb..8fd347c 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,6 @@ gitea-srv.container nextcloud-db.container nextcloud-srv.container paperless-db.container -paperless-srv.container \ No newline at end of file +paperless-srv.container +bookstack-db.container +bookstack-srv.container diff --git a/ansible/deploy_services.yml b/ansible/deploy_services.yml index ea9cc97..d34f02e 100644 --- a/ansible/deploy_services.yml +++ b/ansible/deploy_services.yml @@ -87,3 +87,10 @@ service_name: "paperless" systemd_service_name: "paperless-pod" quadlet_template_src: "./my_service_templates" + - name: Deploy bookstack + include_role: + name: rootless-podman-service + vars: + service_name: "bookstack" + systemd_service_name: "bookstack-pod" + quadlet_template_src: "./my_service_templates" diff --git a/ansible/my_service_templates/bookstack/bookstack-db.container.template b/ansible/my_service_templates/bookstack/bookstack-db.container.template new file mode 100644 index 0000000..876fef8 --- /dev/null +++ b/ansible/my_service_templates/bookstack/bookstack-db.container.template @@ -0,0 +1,16 @@ +[Unit] +Description=Bookstack database + +[Container] +ContainerName=bookstack-db +Image=lscr.io/linuxserver/mariadb:11.4.5 +Volume=/var/vol/bookstack/db:/config:Z +Environment=PUID=1000 +Environment=PGID=1000 +Environment=TZ=Europe/Berlin +Environment=MYSQL_ROOT_PASSWORD= +Environment=MYSQL_DATABASE= +Environment=MYSQL_USER= +Environment=MYSQL_PASSWORD= +AutoUpdate=registry +Pod=bookstack.pod diff --git a/ansible/my_service_templates/bookstack/bookstack-srv.container.template b/ansible/my_service_templates/bookstack/bookstack-srv.container.template new file mode 100644 index 0000000..ee1c2cb --- /dev/null +++ b/ansible/my_service_templates/bookstack/bookstack-srv.container.template @@ -0,0 +1,22 @@ +[Unit] +Description=Bookstack server + +[Container] +ContainerName=bookstack-srv +Image=lscr.io/linuxserver/bookstack:version-v25.02 +Volume=/var/vol/bookstack/data:/config:Z +Environment=PUID=1000 +Environment=PGID=1000 +Environment=TZ=Europe/Berlin +Environment=APP_URL=https://bookstack.rohrschacht.de +# APP_KEY must be a unique key. Generate your own by running +# docker run -it --rm --entrypoint /bin/bash lscr.io/linuxserver/bookstack:latest appkey +# You should keep the "base64:" part for the option value. +Environment=APP_KEY= +Environment=DB_HOST=localhost +Environment=DB_PORT=3306 +Environment=DB_DATABASE= +Environment=DB_USERNAME= +Environment=DB_PASSWORD= +AutoUpdate=registry +Pod=bookstack.pod diff --git a/ansible/my_service_templates/bookstack/bookstack.pod b/ansible/my_service_templates/bookstack/bookstack.pod new file mode 100644 index 0000000..17ba523 --- /dev/null +++ b/ansible/my_service_templates/bookstack/bookstack.pod @@ -0,0 +1,17 @@ +[Unit] +Description=Bookstack deployment +Wants=network-online.target +After=network.target network-online.target + +[Pod] +PodName=bookstack +PublishPort=127.0.0.1:8800:80 + +[Service] +# Restart service when sleep finishes +Restart=on-failure +RestartSec=60 + +[Install] +# Start by default on boot +WantedBy=multi-user.target default.target diff --git a/ansible/traefik_config/dynamic.yml b/ansible/traefik_config/dynamic.yml index 8674061..4d16d91 100644 --- a/ansible/traefik_config/dynamic.yml +++ b/ansible/traefik_config/dynamic.yml @@ -63,6 +63,15 @@ http: certResolver: letsencrypt service: paperless-service + # Router for bookstack.rohrschacht.de + bookstack-router: + rule: "Host(`bookstack.rohrschacht.de`)" + entryPoints: + - websecure + tls: + certResolver: letsencrypt + service: bookstack-service + services: # Service for wekan.rohrschacht.de wekan-service: @@ -104,4 +113,10 @@ http: paperless-service: loadBalancer: servers: - - url: "http://localhost:8700" \ No newline at end of file + - url: "http://localhost:8700" + + # Service for bookstack.rohrschacht.de + bookstack-service: + loadBalancer: + servers: + - url: "http://localhost:8800"