Skip to content

Commit

Permalink
Add Hemmelig
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayurifag committed Dec 18, 2023
1 parent 384b548 commit fa609ac
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 21 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,27 @@ Host mayurifag-prod

## Applications List

| Name | Docker | Default endpoint | App. Port |
| ------------------- | ------ | --------------------------------------------- | ------------- |
| Blocky | | - | - |
| Doku | | <http://doku.mayurifag.local> | 9090 |
| Dozzle | | <http://dozzle.mayurifag.local> | 8080 |
| Filerun | | <http://filerun.mayurifag.local> | 80 [+3306 db] |
| Glances | | <http://glances.mayurifag.local> | 61208/61209 |
| Go-socks5-proxy | | <socks5://mayurifag.local:7777> (+auth) | 1080 |
| Homer | | <http://homer.mayurifag.local> | 8080 |
| Lazydocker | - | - | - |
| mayurifag.github.io | | <http://mayurifag.local> | 8005 |
| Navidrome | | <http://mus.mayurifag.local> | 80 |
| Netdata | | <http://netdata.mayurifag.local> | 19999 |
| Nextcloud | | <http://nextcloud.mayurifag.local> | 80 |
| Portainer | | <http://portainer.mayurifag.local> | 9000 |
| Shadowsocks-rust | | <https://ss.mayurifag.local/xray> (uses TLS) | 1080 |
| Traefik Dashboard | | <http://traefik.mayurifag.local/dashboard/#/> | 8080 (?) |
| Wallabag | | <http://wallabag.mayurifag.local> | 80 |
| Watchtower | | - | - |
| Wireguard-Easy | | <http://wg.mayurifag.local> | 58172 |
| Whattocommit | | <http://commit.mayurifag.local> | 8080 |
| Name | Default endpoint | App. Port |
| ------------------- | --------------------------------------------- | ------------- |
| Blocky | - | - |
| Doku | <http://doku.mayurifag.local> | 9090 |
| Dozzle | <http://dozzle.mayurifag.local> | 8080 |
| Filerun | <http://filerun.mayurifag.local> | 80 [+3306 db] |
| Glances | <http://glances.mayurifag.local> | 61208/61209 |
| Go-socks5-proxy | <socks5://mayurifag.local:7777> (+auth) | 1080 |
| Homer | <http://homer.mayurifag.local> | 8080 |
| Hemmelig | <http://secret.mayurifag.local> | 3000 |
| mayurifag.github.io | <http://mayurifag.local> | 8005 |
| Navidrome | <http://mus.mayurifag.local> | 80 |
| Netdata | <http://netdata.mayurifag.local> | 19999 |
| Nextcloud | <http://nextcloud.mayurifag.local> | 80 |
| Portainer | <http://portainer.mayurifag.local> | 9000 |
| Shadowsocks-rust | <https://ss.mayurifag.local/xray> (uses TLS) | 1080 |
| Traefik Dashboard | <http://traefik.mayurifag.local/dashboard/#/> | 8080 (?) |
| Wallabag | <http://wallabag.mayurifag.local> | 80 |
| Watchtower | - | - |
| Wireguard-Easy | <http://wg.mayurifag.local> | 58172 |
| Whattocommit | <http://commit.mayurifag.local> | 8080 |

## TODO

Expand Down
3 changes: 3 additions & 0 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ wallabag_subdomain: "wallabag"
shadowsocks_enabled: true
shadowsocks_subdomain: "ss"
shadowsocks_password: "change_this"

hemmelig_enabled: true
hemmelig_subdomain: "secret"
3 changes: 3 additions & 0 deletions inventories/sample/group_vars/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ wallabag_subdomain: "wallabag"
shadowsocks_enabled: true
shadowsocks_subdomain: "ss"
shadowsocks_password: "change_this"

hemmelig_enabled: true
hemmelig_subdomain: "secret"
5 changes: 5 additions & 0 deletions provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@
- filerun
when: (filerun_enabled | default(False))

- role: hemmelig
tags:
- hemmelig
when: (hemmelig_enabled | default(False))

- role: navidrome
tags:
- navidrome
Expand Down
10 changes: 10 additions & 0 deletions roles/hemmelig/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
hemmelig_enabled: true

hemmelig_docker_image: hemmeligapp/hemmelig:v5.15.3
hemmelig_available_externally: "true"
hemmelig_subdomain: secret

hemmelig_memory: 1g

hemmelig_data_directory: "{{ docker_home }}/hemmelig"
31 changes: 31 additions & 0 deletions roles/hemmelig/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
- name: Delete Hemmelig directory
file:
path: "{{ hemmelig_data_directory }}"
state: absent

- name: Create Hemmelig Directories
file:
path: "{{ item }}"
state: directory
owner: 1000
group: 1000
with_items:
- "{{ hemmelig_data_directory }}/files"
- "{{ hemmelig_data_directory }}/database"

- name: Create Hemmelig container
docker_container:
name: hemmelig
image: "{{ hemmelig_docker_image }}"
pull: true
volumes:
- "{{ hemmelig_data_directory }}/files:/var/tmp/hemmelig/upload/files"
- "{{ hemmelig_data_directory }}/database:/home/node/hemmelig/database/"
restart_policy: unless-stopped
memory: "{{ hemmelig_memory }}"
labels:
traefik.enable: "{{ hemmelig_available_externally }}"
traefik.http.routers.hemmelig.rule: "Host(`{{ hemmelig_subdomain }}.{{ server_hostname }}`)"
traefik.http.services.hemmelig.loadbalancer.server.port: "3000"
traefik.http.routers.hemmelig.middlewares: "my-headers@file"

0 comments on commit fa609ac

Please sign in to comment.