From d2030c4b8d721a158288be58f0f6435106415c65 Mon Sep 17 00:00:00 2001 From: Phil Date: Tue, 10 Dec 2024 07:05:55 -0700 Subject: [PATCH] added baikal to stack --- dns.yml | 2 ++ roles/docker/files/Caddyfile | 6 ++++++ roles/docker/tasks/baikal.yml | 19 +++++++++++++++++++ roles/docker/tasks/main.yml | 6 +++++- roles/docker/templates/baikal-compose.yml.j2 | 16 ++++++++++++++++ 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 roles/docker/tasks/baikal.yml create mode 100644 roles/docker/templates/baikal-compose.yml.j2 diff --git a/dns.yml b/dns.yml index e1d1348..07519b0 100644 --- a/dns.yml +++ b/dns.yml @@ -27,6 +27,8 @@ ip: "152.53.36.98" - name: "code" ip: "152.53.36.98" + - name: cal + ip: "152.53.36.98" - name: nerder.land dns_records: - name: "forms" diff --git a/roles/docker/files/Caddyfile b/roles/docker/files/Caddyfile index 7ff7315..936e176 100644 --- a/roles/docker/files/Caddyfile +++ b/roles/docker/files/Caddyfile @@ -10,6 +10,12 @@ pin.thesatelliteoflove.com { reverse_proxy pinry-pinry-1:80 } +cal.thesatelliteoflove.com { + redir /.well-known/caldav /dav.php 302 + redir /.well-known/carddav /dav.php 302 + reverse_proxy baikal-baikal-1:80 +} + books.thesatelliteoflove.com { reverse_proxy authentik-server-1:9000 } diff --git a/roles/docker/tasks/baikal.yml b/roles/docker/tasks/baikal.yml new file mode 100644 index 0000000..8a19fcb --- /dev/null +++ b/roles/docker/tasks/baikal.yml @@ -0,0 +1,19 @@ +- name: make baikal directories + ansible.builtin.file: + path: "{{ item}}" + state: directory + loop: + - /opt/stacks/baikal + +- name: Template out the compose file + ansible.builtin.template: + src: baikal-compose.yml.j2 + dest: /opt/stacks/baikal/compose.yml + owner: root + mode: 644 + +- name: deploy baikal stack + community.docker.docker_compose_v2: + project_src: /opt/stacks/baikal + files: + - compose.yml \ No newline at end of file diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 77e9cf8..4a75775 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -128,4 +128,8 @@ - name: Install codeserver import_tasks: codeserver.yml - tags: codeserver \ No newline at end of file + tags: codeserver + +- name: Install baikal + import_tasks: baikal.yml + tags: baikal \ No newline at end of file diff --git a/roles/docker/templates/baikal-compose.yml.j2 b/roles/docker/templates/baikal-compose.yml.j2 new file mode 100644 index 0000000..afb182e --- /dev/null +++ b/roles/docker/templates/baikal-compose.yml.j2 @@ -0,0 +1,16 @@ +services: + baikal: + image: ckulka/baikal:nginx + restart: unless-stopped + volumes: + - config:/var/www/baikal/config + - data:/var/www/baikal/Specific + +volumes: + config: + data: + +networks: + default: + external: true + name: lava \ No newline at end of file