diff --git a/roles/docker/files/Caddyfile b/roles/docker/files/Caddyfile index 24c8392..925be72 100644 --- a/roles/docker/files/Caddyfile +++ b/roles/docker/files/Caddyfile @@ -25,4 +25,18 @@ social.thesatelliteoflove.com { grist.thesatelliteoflove.com { reverse_proxy grist-grist-1:8484 -} \ No newline at end of file +} + +home.thesatelliteoflove.com:80 { + @allowed { + remote_ip 100.64.0.0/10 + } + + handle @allowed { + reverse_proxy glance:8080 + } + + handle { + respond "Access denied" 403 + } +} diff --git a/roles/docker/tasks/caddy.yml b/roles/docker/tasks/caddy.yml index ed14d80..4e61847 100644 --- a/roles/docker/tasks/caddy.yml +++ b/roles/docker/tasks/caddy.yml @@ -22,6 +22,6 @@ - name: deploy caddy stack community.docker.docker_compose_v2: project_src: /opt/stacks/caddy - recreate: always + recreate: never files: - compose.yml \ No newline at end of file diff --git a/roles/docker/tasks/glance.yml b/roles/docker/tasks/glance.yml new file mode 100644 index 0000000..2a3538a --- /dev/null +++ b/roles/docker/tasks/glance.yml @@ -0,0 +1,26 @@ +- name: make glance directories + ansible.builtin.file: + path: "{{ item}}" + state: directory + loop: + - /opt/stacks/glance + +- name: Template out the compose file + ansible.builtin.template: + src: glance-compose.yml.j2 + dest: /opt/stacks/glance/compose.yml + owner: root + mode: 644 + +- name: Template out the config file + ansible.builtin.template: + src: glance.yml.j2 + dest: /opt/stacks/glance/glance.yml + owner: root + mode: 644 + +- name: deploy glances stack + community.docker.docker_compose_v2: + project_src: /opt/stacks/glance + files: + - compose.yml \ No newline at end of file diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index 2ecb682..f9ee660 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -88,4 +88,8 @@ - name: Install tasksmd import_tasks: tasksmd.yml - tags: tasksmd \ No newline at end of file + tags: tasksmd + +- name: Install glance + import_tasks: glance.yml + tags: glance \ No newline at end of file diff --git a/roles/docker/templates/glance-compose.yml.j2 b/roles/docker/templates/glance-compose.yml.j2 new file mode 100644 index 0000000..4d4966b --- /dev/null +++ b/roles/docker/templates/glance-compose.yml.j2 @@ -0,0 +1,13 @@ +services: + glance: + image: glanceapp/glance + volumes: + - ./glance.yml:/app/glance.yml + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + restart: unless-stopped + +networks: + default: + external: true + name: lava \ No newline at end of file diff --git a/roles/docker/templates/glance.yml.j2 b/roles/docker/templates/glance.yml.j2 new file mode 100644 index 0000000..609f9c5 --- /dev/null +++ b/roles/docker/templates/glance.yml.j2 @@ -0,0 +1,65 @@ +pages: + - name: Home + columns: + - size: small + widgets: + - type: calendar + + - type: rss + limit: 10 + collapse-after: 3 + cache: 3h + feeds: + - url: https://ciechanow.ski/atom.xml + - url: https://www.joshwcomeau.com/rss.xml + title: Josh Comeau + - url: https://samwho.dev/rss.xml + - url: https://awesomekling.github.io/feed.xml + - url: https://ishadeed.com/feed.xml + title: Ahmad Shadeed + + - type: twitch-channels + channels: + - theprimeagen + - cohhcarnage + - christitustech + - blurbs + - asmongold + - jembawls + + - size: full + widgets: + - type: hacker-news + + - type: videos + channels: + - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling + - UCv6J_jJa8GJqFwQNgNrMuww # ServeTheHome + - UCOk-gHyjcWZNj3Br4oxwh0A # Techno Tim + + - type: reddit + subreddit: selfhosted + + - size: small + widgets: + - type: weather + location: London, United Kingdom + + - type: markets + markets: + - symbol: SPY + name: S&P 500 + - symbol: BTC-USD + name: Bitcoin + - symbol: NVDA + name: NVIDIA + - symbol: AAPL + name: Apple + - symbol: MSFT + name: Microsoft + - symbol: GOOGL + name: Google + - symbol: AMD + name: AMD + - symbol: RDDT + name: Reddit \ No newline at end of file