Browse Source

Add Nextcloud app

master-prepare
Luke Childs 3 years ago
parent
commit
dcaae95daa
  1. 0
      apps/nextcloud/data/db/.gitkeep
  2. 0
      apps/nextcloud/data/nextcloud/.gitkeep
  3. 0
      apps/nextcloud/data/redis/.gitkeep
  4. 68
      apps/nextcloud/docker-compose.yml
  5. 22
      apps/registry.json
  6. 10
      scripts/configure
  7. 5
      templates/.env-sample
  8. 4
      templates/torrc-sample

0
apps/nextcloud/data/db/.gitkeep

0
apps/nextcloud/data/nextcloud/.gitkeep

0
apps/nextcloud/data/redis/.gitkeep

68
apps/nextcloud/docker-compose.yml

@ -0,0 +1,68 @@
version: "3.7"
services:
db:
image: mariadb:10.5.8@sha256:8040983db146f729749081c6b216a19d52e0973134e2e34c0b4fd87f48bc15b0
user: "1000:1000"
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=moneyprintergobrrr
- MYSQL_PASSWORD=moneyprintergobrrr
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
networks:
default:
ipv4_address: $APP_NEXTCLOUD_DB_IP
redis:
image: redis:6.2.2-buster@sha256:e10f55f92478715698a2cef97c2bbdc48df2a05081edd884938903aa60df6396
user: "1000:1000"
restart: on-failure
volumes:
- "${APP_DATA_DIR}/data/redis:/data"
networks:
default:
ipv4_address: $APP_NEXTCLOUD_REDIS_IP
web:
image: nextcloud:22.0.0-apache@sha256:55de721417c16ff110720217406778e16f1b63154d2e8d42fc7913c37dbe6d50
# Currently needs to be run as root, if we run as uid 1000 this fails
# https://github.com/nextcloud/docker/blob/05026b029d37fc5cd488d4a4a2a79480e39841ba/21.0/apache/entrypoint.sh#L53-L77
# user: "1000:1000"
restart: on-failure
ports:
- ${APP_NEXTCLOUD_PORT}:80
volumes:
- ${APP_DATA_DIR}/data/nextcloud:/var/www/html
environment:
- MYSQL_HOST=${APP_NEXTCLOUD_DB_IP}
- REDIS_HOST=${APP_NEXTCLOUD_REDIS_IP}
- MYSQL_PASSWORD=moneyprintergobrrr
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- NEXTCLOUD_TRUSTED_DOMAINS=${APP_DOMAIN}:${APP_NEXTCLOUD_PORT} ${APP_HIDDEN_SERVICE}
depends_on:
- db
- redis
networks:
default:
ipv4_address: $APP_NEXTCLOUD_IP
cron:
image: nextcloud:22.0.0-apache@sha256:55de721417c16ff110720217406778e16f1b63154d2e8d42fc7913c37dbe6d50
# Currently needs to be run as root, if we run as uid 1000 this fails
# https://github.com/nextcloud/docker/blob/05026b029d37fc5cd488d4a4a2a79480e39841ba/21.0/apache/entrypoint.sh#L53-L77
# user: "1000:1000"
restart: on-failure
volumes:
- ${APP_DATA_DIR}/data/nextcloud:/var/www/html
entrypoint: /cron.sh
depends_on:
- db
- redis
networks:
default:
ipv4_address: $APP_NEXTCLOUD_CRON_IP

22
apps/registry.json

@ -1,4 +1,26 @@
[
{
"id": "nextcloud",
"category": "Files",
"name": "Nextcloud",
"version": "21.0.2",
"tagline": "Productivity platform that keeps you in control",
"description": "Nextcloud puts your data at your fingertips, under your control. Store your documents, calendar, contacts and photos on your Umbrel instead of some company's data center. Features:\n\n- Mobile and desktop sync \n- Versioning and undelete \n- Galleries and activity feed \n- File editing and preview support for PDF, images, text files, Open Document, Word files and more. \n- Smooth performance and easy user interface. \n- Fine-grained control over access to data and sharing capabilities by user and by group.\n\nNote: After creating your admin account when you open Nextcloud for the first time, you'll be taken to a white (blank) screen. Please close the app and open it again to continue.",
"developer": "Nextcloud GmbH",
"website": "https://nextcloud.com",
"dependencies": [],
"repo": "https://github.com/nextcloud/server",
"support": "https://help.nextcloud.com/categories",
"port": 8081,
"gallery": [
"1.jpg",
"2.jpg",
"3.jpg"
],
"path": "",
"defaultPassword": "",
"torOnly": false
},
{
"id": "mempool",
"category": "Explorers",

10
scripts/configure

@ -158,6 +158,11 @@ APP_SAMOURAI_SERVER_NODE_IP="10.21.21.25"
APP_BLUEWALLET_LNDHUB_IP="10.21.21.30"
APP_BLUEWALLET_LNDHUB_PORT="3008"
APP_BLUEWALLET_REDIS_IP="10.21.21.31"
APP_NEXTCLOUD_PORT="8081"
APP_NEXTCLOUD_IP="10.21.21.32"
APP_NEXTCLOUD_DB_IP="10.21.21.33"
APP_NEXTCLOUD_REDIS_IP="10.21.21.34"
APP_NEXTCLOUD_CRON_IP="10.21.21.35"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -321,6 +326,11 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-bluewallet-lndhub-ip>/${APP_BLUEWALLET_LNDHUB_IP}/g" "${template}"
sed -i "s/<app-bluewallet-lndhub-port>/${APP_BLUEWALLET_LNDHUB_PORT}/g" "${template}"
sed -i "s/<app-bluewallet-redis-ip>/${APP_BLUEWALLET_REDIS_IP}/g" "${template}"
sed -i "s/<app-nextcloud-port>/${APP_NEXTCLOUD_PORT}/g" "${template}"
sed -i "s/<app-nextcloud-ip>/${APP_NEXTCLOUD_IP}/g" "${template}"
sed -i "s/<app-nextcloud-db-ip>/${APP_NEXTCLOUD_DB_IP}/g" "${template}"
sed -i "s/<app-nextcloud-redis-ip>/${APP_NEXTCLOUD_REDIS_IP}/g" "${template}"
sed -i "s/<app-nextcloud-cron-ip>/${APP_NEXTCLOUD_CRON_IP}/g" "${template}"
done
##########################################################

5
templates/.env-sample

@ -61,3 +61,8 @@ APP_SAMOURAI_SERVER_NODE_IP=<app-samourai-server-node-ip>
APP_BLUEWALLET_LNDHUB_IP=<app-bluewallet-lndhub-ip>
APP_BLUEWALLET_LNDHUB_PORT=<app-bluewallet-lndhub-port>
APP_BLUEWALLET_REDIS_IP=<app-bluewallet-redis-ip>
APP_NEXTCLOUD_PORT=<app-nextcloud-port>
APP_NEXTCLOUD_IP=<app-nextcloud-ip>
APP_NEXTCLOUD_DB_IP=<app-nextcloud-db-ip>
APP_NEXTCLOUD_REDIS_IP=<app-nextcloud-redis-ip>
APP_NEXTCLOUD_CRON_IP=<app-nextcloud-cron-ip>

4
templates/torrc-sample

@ -84,4 +84,8 @@ HiddenServicePort 80 <app-samourai-server-whirlpool-ip>:<app-samourai-server-whi
HiddenServiceDir /var/lib/tor/app-bluewallet
HiddenServicePort 80 <app-bluewallet-lndhub-ip>:<app-bluewallet-lndhub-port>
# nextcloud Hidden Service
HiddenServiceDir /var/lib/tor/app-nextcloud
HiddenServicePort 80 <app-nextcloud-ip>:80
HashedControlPassword <password>

Loading…
Cancel
Save