From 1b568a7f2d5d2493d85f21da31d27cf529a5b63a Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Tue, 11 Jan 2022 21:15:49 +0000 Subject: [PATCH] services: ship syncthing syncing via syncthing is way better and more reliable that using nextcloud's syncclient mount syncthing to nextcloud as external storage, nextcloud now is essentially just used as fancy ui and a caldav server, and some other apps --- README.md | 3 +++ docker_compose/nextcloud.yml | 9 +++++---- docker_compose/syncthing.yml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 docker_compose/syncthing.yml diff --git a/README.md b/README.md index 4c2e10e..b39775f 100644 --- a/README.md +++ b/README.md @@ -89,3 +89,6 @@ These are the available environment variables: ### Searx * **SEARX_DIR**: Folder for searx files + +### Syncthing +* **SYNCTHING_DIR**: Folder for syncthing files diff --git a/docker_compose/nextcloud.yml b/docker_compose/nextcloud.yml index f752c32..8ab0426 100644 --- a/docker_compose/nextcloud.yml +++ b/docker_compose/nextcloud.yml @@ -3,7 +3,7 @@ version: '2' services: db: image: mariadb:10.5 -# restart: always + restart: always command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW volumes: - $NEXTCLOUD_DB_DATADIR:/var/lib/mysql @@ -17,7 +17,7 @@ services: app: image: nextcloud:latest -# restart: always + restart: always expose: - "80" - "443" @@ -25,6 +25,7 @@ services: - db volumes: - $NEXTCLOUD_DATADIR:/var/www/html + - $SYNCTHING_DIR:/syncthing environment: # - NEXTCLOUD_ADMIN_USER=testuser #this is just for initial setup, and the user can be delete afterwards # - NEXTCLOUD_ADMIN_PASSWORD=test123 @@ -33,9 +34,9 @@ services: - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_HOST=db - - VIRTUAL_HOST=files.$LETSENCRYPT_DOMAIN + - VIRTUAL_HOST=nextcloud.$LETSENCRYPT_DOMAIN - VIRTUAL_PORT=80 - - LETSENCRYPT_HOST=files.$LETSENCRYPT_DOMAIN + - LETSENCRYPT_HOST=nextcloud.$LETSENCRYPT_DOMAIN - LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL networks: - default diff --git a/docker_compose/syncthing.yml b/docker_compose/syncthing.yml new file mode 100644 index 0000000..660a9ee --- /dev/null +++ b/docker_compose/syncthing.yml @@ -0,0 +1,30 @@ +version: "3" +services: + syncthing: + image: syncthing/syncthing + container_name: syncthing + hostname: mininas + volumes: + - $SYNCTHING_DIR:/var/syncthing + expose: + - 8384 + - 22000/tcp + - 22000/udp + environment: + - PUID=33 + - PGID=33 +# - PUID=1000 +# - PGID=1000 + - VIRTUAL_HOST=files.$LETSENCRYPT_DOMAIN + - VIRTUAL_PORT=8384 + - LETSENCRYPT_HOST=files.$LETSENCRYPT_DOMAIN + - LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL + restart: unless-stopped + networks: + - default + + +networks: + default: + external: + name: $SERVER_DOCKER_NETWORKNAME