Skip to content

Commit

Permalink
Add Owncloud Infinite Scale
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayurifag committed Apr 19, 2024
1 parent 30375c4 commit 9dace15
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 25 deletions.
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,28 @@ 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] |
| 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 |
| 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 |
| Owncloud Infinite Scale | <http://ocis.mayurifag.local> | 9200 |
| 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 All @@ -131,7 +132,7 @@ need to deploy my services once again.
### High priority

- [ ] Log rotation for docker containers
- [ ] https://github.com/alexta69/metube
- [ ] ~~https://github.com/alexta69/metube~~
- [ ] ~~Add cleaning up apt-get to get extra 1GB~~
- [ ] ~~Think how to rotate logs easily for docker (takes all the space in a year or more)~~
- [ ] Ssh configuration: change port and make the sshd configuration cheatsheet with Readme
Expand All @@ -140,13 +141,13 @@ need to deploy my services once again.
- [ ] Uptime Kuma
- [x] Blocky DNS
- [ ] Add systemd services
- [ ] Migrate to dashboard which is easy maintainable: flame (with labels) / homerr
- [ ] Migrate to dashboard which is easy maintainable: flame (with labels)
- [ ] Add Authentik / Remove baseauth
- [ ] Add Cloudflare companion tiredofit/traefik-cloudflare-companion:latest docker
- [ ] Add Vikunja <https://vikunja.io/docs/full-docker-example/>
- [ ] Move this section to issues and kanban
- [ ] Add zswap
- [ ] <https://github.com/pglombardo/PasswordPusher>
- [ ] ~~<https://github.com/pglombardo/PasswordPusher>~~
- [x] Migrate from mysql to postgres for nextcloud. Look other perfomance boosters. cron at docker for nextcloud. bump versions
- [x] <https://github.com/ReinerNippes/nextcloud_on_docker>
- [x] <https://help.nextcloud.com/t/howto-ubuntu-docker-nextcloud-talk-collabora/76430>
Expand All @@ -155,11 +156,12 @@ need to deploy my services once again.

### Medium priority

- [ ] https://github.com/epoupon/lms
- [ ] Add automatic backup solution (duplicati?). Do I need anything more than
/data/docker_data?
- [ ] Add ufw with rules + make docker respect the rules
- [ ] Add pastebin
- [ ] Make traefik to write logs to file + logrotate them
- [ ] ~~Make traefik to write logs to file + logrotate them~~
- [ ] Suggest if I need more fail2ban jail rules
- [ ] <https://shadowsocks.org/en/wiki/Setup-fail2ban.html>
- [ ] Add motd.txt to server
Expand Down
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Vagrant.configure(2) do |config|
mus.mayurifag.local
netdata.mayurifag.local
nextcloud.mayurifag.local
ocis.mayurifag.local
portainer.mayurifag.local
traefik.mayurifag.local
wallabag.mayurifag.local
Expand Down
3 changes: 3 additions & 0 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ whattocommit_subdomain: "commit"
nextcloud_enabled: true
nextcloud_subdomain: "nextcloud"

ocis_enabled: true
ocis_subdomain: "ocis"

filerun_enabled: true
filerun_subdomain: "filerun"

Expand Down
3 changes: 3 additions & 0 deletions inventories/sample/group_vars/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ whattocommit_subdomain: "commit"
nextcloud_enabled: true
nextcloud_subdomain: "nextcloud"

ocis_enabled: true
ocis_subdomain: "ocis"

filerun_enabled: true
filerun_subdomain: "filerun"

Expand Down
5 changes: 5 additions & 0 deletions provisioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@
- nextcloud
when: (nextcloud_enabled | default(False))

- role: ocis
tags:
- ocis
when: (ocis_enabled | default(False))

- role: glances
tags:
- glances
Expand Down
16 changes: 16 additions & 0 deletions roles/ocis/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
ocis_enabled: true
ocis_available_externally: "true"

# directories
ocis_data_directory: "{{ docker_home }}/ocis"

ocis_container: "owncloud/ocis"
ocis_version: "5.0.2"

ocis_subdomain: "ocis"

# username / passwords
ocis_sql_user: "ocis-user"
ocis_sql_password: "ocis-pass"
ocis_redis_password: "ocis-redis"
45 changes: 45 additions & 0 deletions roles/ocis/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
- name: Delete OCIS directory
file:
path: "{{ ocis_data_directory }}"
state: absent

- name: Create OCIS directories
file:
path: "{{ item }}"
state: directory
owner: 1000
group: 1000
with_items:
- "{{ ocis_data_directory }}/userfiles"
- "{{ ocis_data_directory }}/config"

- name: OCIS Docker Container
docker_container:
name: ocis
image: "{{ ocis_container }}:{{ ocis_version }}"
pull: true
recreate: yes
volumes:
- "{{ ocis_data_directory }}/config:/etc/ocis"
- "{{ ocis_data_directory }}/userfiles:/var/lib/ocis"
entrypoint:
- /bin/sh
command: ["-c", "ocis init || true; ocis server"]
env:
TZ: "{{ server_timezone }}"
OCIS_URL: "https://{{ ocis_subdomain }}.{{ server_hostname }}"
OCIS_LOG_LEVEL: "info"
OCIS_LOG_COLOR: "false"
PROXY_TLS: "false"
OCIS_INSECURE: "false"
PROXY_ENABLE_BASIC_AUTH: "false"
IDM_ADMIN_PASSWORD: "{{ admin_userpassword }}"
IDM_CREATE_DEMO_USERS: "false"
restart_policy: unless-stopped
labels:
traefik.enable: "{{ ocis_available_externally }}"
traefik.http.routers.ocis.rule: "Host(`{{ ocis_subdomain }}.{{ server_hostname }}`)"
traefik.http.services.ocis.loadbalancer.server.port: "9200"
traefik.http.routers.ocis.middlewares: "my-headers@file"
# traefik.http.routers.ocis.service: ocis

0 comments on commit 9dace15

Please sign in to comment.