diff --git a/dns.yml b/dns.yml index 469b55a..5501c02 100644 --- a/dns.yml +++ b/dns.yml @@ -33,6 +33,8 @@ ip: "152.53.36.98" - name: loclog ip: "152.53.36.98" + - name: habits + 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 b562d60..84ea3c2 100644 --- a/roles/docker/files/Caddyfile +++ b/roles/docker/files/Caddyfile @@ -41,6 +41,10 @@ phlog.thesatelliteoflove.com { reverse_proxy ghost-1-ghost-1:2368 } +habits.thesatelliteoflove.com { + reverse_proxy beaverhabits:8080 +} + code.thesatelliteoflove.com { reverse_proxy authentik-server-1:9000 } diff --git a/roles/docker/tasks/beaver.yml b/roles/docker/tasks/beaver.yml new file mode 100644 index 0000000..df81d64 --- /dev/null +++ b/roles/docker/tasks/beaver.yml @@ -0,0 +1,19 @@ +- name: make beaver directories + ansible.builtin.file: + path: "{{ item}}" + state: directory + loop: + - /opt/stacks/beaver + +- name: Template out the compose file + ansible.builtin.template: + src: beaver-compose.yml.j2 + dest: /opt/stacks/beaver/compose.yml + owner: root + mode: 644 + +- name: deploy beaver stack + community.docker.docker_compose_v2: + project_src: /opt/stacks/beaver + files: + - compose.yml \ No newline at end of file diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 7fc6b03..8f4a33d 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -146,3 +146,6 @@ import_tasks: dawarich.yml tags: dawarich +- name: Install beaver + import_tasks: beaver.yml + tags: beaver \ No newline at end of file diff --git a/roles/docker/templates/beaver-compose.yml.j2 b/roles/docker/templates/beaver-compose.yml.j2 new file mode 100644 index 0000000..bf76a13 --- /dev/null +++ b/roles/docker/templates/beaver-compose.yml.j2 @@ -0,0 +1,20 @@ +services: + beaverhabits: + container_name: beaverhabits + user: 1000:1000 + environment: + # See the note below to find all the environment variables + - HABITS_STORAGE=USER_DISK # DATABASE stores in a single SQLite database named habits.db. USER_DISK option saves in a local json file. + - MAX_USER_COUNT=1 + volumes: + - ./data:/app/.user/ # Change directory to match your docker file scheme. + restart: unless-stopped + image: daya0576/beaverhabits:latest + +volumes: + data: + +networks: + default: + external: true + name: lava \ No newline at end of file