Skip to content

Commit

Permalink
Merge branch 'nc' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayurifag committed Apr 20, 2024
2 parents d6572de + 1d4b88d commit afc39f5
Show file tree
Hide file tree
Showing 35 changed files with 85 additions and 381 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,28 +98,26 @@ Host mayurifag-prod

## Applications List

| 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] |
| Filebrowser | <http://fb.mayurifag.local> | 80 |
| 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 |
| Owncloud Infinite Scale | <http://ocis.mayurifag.local> | 9200 |
| Portainer | <http://portainer.mayurifag.local> | 9000 |
| Shadowsocks-rust | <https://ss.mayurifag.local/xray> (uses TLS) | 1080 |
| 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 |
| Filebrowser | <http://fb.mayurifag.local> | 80 |
| 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 |
| Owncloud Infinite Scale | <http://ocis.mayurifag.local> | 9200 |
| Portainer | <http://portainer.mayurifag.local> | 9000 |
| Shadowsocks-rust | <https://ss.mayurifag.local/xray> (uses TLS) | 1080 |
| Wallabag | <http://wallabag.mayurifag.local> | 80 |
| Watchtower | - | - |
| Wireguard-Easy | <http://wg.mayurifag.local> | 58172 |
| Whattocommit | <http://commit.mayurifag.local> | 8080 |

## TODO

Expand All @@ -131,6 +129,8 @@ need to deploy my services once again.

### High priority

- [ ] Some strange things with Traefik config. If problem with "my-headers" ->
return "my-headers@file"
- [ ] Log rotation for docker containers
- [ ] ~~https://github.com/alexta69/metube~~
- [ ] ~~Add cleaning up apt-get to get extra 1GB~~
Expand Down
2 changes: 0 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ Vagrant.configure(2) do |config|
dozzle.mayurifag.local
glances.mayurifag.local
fb.mayurifag.local
filerun.mayurifag.local
homer.mayurifag.local
mus.mayurifag.local
netdata.mayurifag.local
nextcloud.mayurifag.local
ocis.mayurifag.local
portainer.mayurifag.local
traefik.mayurifag.local
Expand Down
6 changes: 0 additions & 6 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,12 @@ doku_subdomain: "doku"
whattocommit_enabled: true
whattocommit_subdomain: "commit"

nextcloud_enabled: true
nextcloud_subdomain: "nextcloud"

ocis_enabled: true
ocis_subdomain: "ocis"

filebrowser_enabled: true
filebrowser_subdomain: "fb"

filerun_enabled: true
filerun_subdomain: "filerun"

blocky_enabled: true

navidrome_enabled: true
Expand Down
6 changes: 0 additions & 6 deletions inventories/sample/group_vars/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,12 @@ doku_subdomain: "doku"
whattocommit_enabled: true
whattocommit_subdomain: "commit"

nextcloud_enabled: true
nextcloud_subdomain: "nextcloud"

ocis_enabled: true
ocis_subdomain: "ocis"

filebrowser_enabled: true
filebrowser_subdomain: "fb"

filerun_enabled: true
filerun_subdomain: "filerun"

blocky_enabled: true

navidrome_enabled: true
Expand Down
16 changes: 0 additions & 16 deletions provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@
- blocky
when: (blocky_enabled | default(False))

- role: nextcloud
tags:
- nextcloud
when: (nextcloud_enabled | default(False))

- role: ocis
tags:
- ocis
Expand Down Expand Up @@ -138,11 +133,6 @@
- dozzle
when: (dozzle_enabled | default(False))

- role: filerun
tags:
- filerun
when: (filerun_enabled | default(False))

- role: hemmelig
tags:
- hemmelig
Expand All @@ -153,12 +143,6 @@
- navidrome
when: (navidrome_enabled | default(False))

# Nextcloud is unable to configure right after install and I dont want to wait untill il will be ok. So moved this section here.
- role: nextcloud_config
tags:
- nextcloud
when: (nextcloud_enabled | default(False))

- role: geerlingguy.security

- role: cheatsheet
15 changes: 1 addition & 14 deletions roles/cheatsheet/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@
Dont forget to change SSH configuration (user, etc.)
$ ssh mayurifag-prod
### Nextcloud
- Remove all files
- Settings: Language/Locale; Accessibility -> Dark Theme
- Disable apps: Collaborative tags, Usage survey, First run wizard, Monitoring
- Enable apps: News, Notes, Keeweb, Calendar, Contacts, Tasks
### Wallabag
Change default user's password from `wallabag:wallabag` into anything else.
Expand All @@ -32,13 +25,7 @@
Make user and add default docker entrypoint.
### Filerun
Change username
Set dark theme
Enable API
### Files Nextcloud/Filerun
### Files (Filebrowser/OCIS)
You have to sync files now via app. Setup iOS/Android/Mac/Win(?)
Sync bookmarks via floccus
Expand Down
6 changes: 3 additions & 3 deletions roles/doku/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
image: amerkurev/doku
pull: true
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/:/hostroot:ro'
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/:/hostroot:ro"
restart_policy: unless-stopped
labels:
traefik.enable: "{{ doku_available_externally }}"
traefik.http.routers.doku.rule: "Host(`{{ doku_subdomain }}.{{ server_hostname }}`)"
traefik.http.services.doku.loadbalancer.server.port: "9090"
traefik.http.routers.doku.middlewares: "auth@file,my-headers@file"
traefik.http.routers.doku.middlewares: "auth,my-headers"
2 changes: 1 addition & 1 deletion roles/dozzle/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
traefik.enable: "{{ dozzle_available_externally }}"
traefik.http.routers.dozzle.rule: "Host(`{{ dozzle_subdomain }}.{{ server_hostname }}`)"
traefik.http.services.dozzle.loadbalancer.server.port: "8080"
traefik.http.routers.dozzle.middlewares: "my-headers@file"
traefik.http.routers.dozzle.middlewares: "my-headers"
3 changes: 2 additions & 1 deletion roles/filebrowser/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
filebrowser_enabled: true
filebrowser_available_externally: "true"

filebrowser_data_directory: "{{ files_home }}/filebrowser"
filebrowser_data_directory: "{{ docker_home }}/filebrowser"
filebrowser_files_directory: "{{ files_home }}/"

filebrowser_container: "filebrowser/filebrowser"
filebrowser_version: "v2.28.0-s6"

filebrowser_subdomain: "fb"
syncthing_subdomain: "st"

Check failure on line 12 in roles/filebrowser/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use filebrowser_ as a prefix. (vars: syncthing_subdomain)

filebroswer_uid: "{{ admin_uid }}"

Check failure on line 14 in roles/filebrowser/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use filebrowser_ as a prefix. (vars: filebroswer_uid)
filebroswer_gid: "{{ admin_gid }}"

Check failure on line 15 in roles/filebrowser/defaults/main.yml

View workflow job for this annotation

GitHub Actions / ansible-lint

var-naming[no-role-prefix]

Variables names from within roles should use filebrowser_ as a prefix. (vars: filebroswer_gid)
31 changes: 28 additions & 3 deletions roles/filebrowser/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
state: directory
owner: "{{ filebroswer_uid }}"
group: "{{ filebroswer_gid }}"
mode: u+rw,g-wx,o-rwx
mode: u+rwx,g+rwx,o-rwx
with_items:
- "{{ filebrowser_files_directory }}"
- "{{ filebrowser_data_directory }}/config"
- "{{ filebrowser_data_directory }}/syncthing_config"

- name: Touch Filebrowser database file
file:
Expand Down Expand Up @@ -42,7 +43,7 @@
volumes:
- "{{ filebrowser_data_directory }}/config/filebrowser.db:/database/filebrowser.db"
- "{{ filebrowser_data_directory }}/config/settings.json:/config/settings.json"
- "{{ filebrowser_data_directory }}/files:/srv"
- "{{ filebrowser_files_directory }}/:/srv"
env:
TZ: "{{ server_timezone }}"
PUID: "{{ filebroswer_uid }}"
Expand All @@ -58,4 +59,28 @@
traefik.enable: "{{ filebrowser_available_externally }}"
traefik.http.routers.filebrowser.rule: "Host(`{{ filebrowser_subdomain }}.{{ server_hostname }}`)"
traefik.http.services.filebrowser.loadbalancer.server.port: "80"
traefik.http.routers.filebrowser.middlewares: "my-headers@file"
# traefik.http.routers.filebrowser.middlewares: "my-headers"

- name: Syncthing Docker Container
docker_container:
name: syncthing
image: "linuxserver/syncthing"
pull: true
recreate: yes
volumes:
- "{{ filebrowser_data_directory }}/syncthing_config:/config"
- "{{ filebrowser_files_directory }}:/mnt"
env:
TZ: "{{ server_timezone }}"
PUID: "{{ filebroswer_uid }}"
PGID: "{{ filebroswer_gid }}"
ports:
# - "8384:8384" # web ui - we pass it through traefik
- "22000:22000"
- "21027:21027/udp"
restart_policy: unless-stopped
labels:
traefik.enable: "{{ filebrowser_available_externally }}"
traefik.http.routers.syncthing.rule: "Host(`{{ syncthing_subdomain }}.{{ server_hostname }}`)"
traefik.http.services.syncthing.loadbalancer.server.port: "8384"
# traefik.http.routers.syncthing.middlewares: "my-headers"
12 changes: 0 additions & 12 deletions roles/filerun/defaults/main.yml

This file was deleted.

69 changes: 0 additions & 69 deletions roles/filerun/tasks/main.yml

This file was deleted.

7 changes: 0 additions & 7 deletions roles/filerun/templates/config.php.j2

This file was deleted.

2 changes: 1 addition & 1 deletion roles/glances/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
traefik.enable: "{{ glances_available_externally }}"
traefik.http.routers.glances.rule: "Host(`{{ glances_subdomain }}.{{ server_hostname }}`)"
traefik.http.services.glances.loadbalancer.server.port: "61208"
traefik.http.routers.glances.middlewares: "auth@file,my-headers@file"
traefik.http.routers.glances.middlewares: "auth,my-headers"
2 changes: 1 addition & 1 deletion roles/hemmelig/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
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"
traefik.http.routers.hemmelig.middlewares: "my-headers"
2 changes: 1 addition & 1 deletion roles/homer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
traefik.enable: "true"
traefik.http.routers.homer.rule: "Host(`{{ homer_subdomain }}.{{ server_hostname }}`)"
traefik.http.services.homer.loadbalancer.server.port: "8080"
traefik.http.routers.homer.middlewares: "auth@file,my-headers@file"
traefik.http.routers.homer.middlewares: "auth,my-headers"
12 changes: 0 additions & 12 deletions roles/homer/templates/config.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ services:
- name: "Services"
icon: "fas fa-laptop-code"
items:
{% if nextcloud_enabled == true %}
- name: "Nextcloud"
icon: "fas fa-cloud"
subtitle: "Auth need to configure"
url: "http://{{ nextcloud_subdomain }}.{{ server_hostname }}"
{% endif %}
{% if filerun_enabled == true %}
- name: "Filerun"
icon: "fas fa-cloud"
subtitle: "Auth need to configure"
url: "http://{{ filerun_subdomain }}.{{ server_hostname }}"
{% endif %}
{% if portainer_enabled == true %}
- name: "Portainer"
icon: "fas fa-toolbox"
Expand Down
2 changes: 1 addition & 1 deletion roles/mayurifag_github_io/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
traefik.enable: "{{ mayurifag_github_io_available_externally }}"
traefik.http.routers.mayurifag_github_io.rule: "Host(`{{ server_hostname }}`)"
traefik.http.services.mayurifag_github_io.loadbalancer.server.port: "8005"
traefik.http.routers.mayurifag_github_io.middlewares: "my-headers@file"
traefik.http.routers.mayurifag_github_io.middlewares: "my-headers"
Loading

0 comments on commit afc39f5

Please sign in to comment.