Skip to content

Commit dcaae95

Browse files
committed
Add Nextcloud app
1 parent 3f9d7f0 commit dcaae95

8 files changed

Lines changed: 109 additions & 0 deletions

File tree

apps/nextcloud/data/db/.gitkeep

Whitespace-only changes.

apps/nextcloud/data/nextcloud/.gitkeep

Whitespace-only changes.

apps/nextcloud/data/redis/.gitkeep

Whitespace-only changes.

apps/nextcloud/docker-compose.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
version: "3.7"
2+
3+
services:
4+
db:
5+
image: mariadb:10.5.8@sha256:8040983db146f729749081c6b216a19d52e0973134e2e34c0b4fd87f48bc15b0
6+
user: "1000:1000"
7+
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
8+
restart: on-failure
9+
volumes:
10+
- ${APP_DATA_DIR}/data/db:/var/lib/mysql
11+
environment:
12+
- MYSQL_ROOT_PASSWORD=moneyprintergobrrr
13+
- MYSQL_PASSWORD=moneyprintergobrrr
14+
- MYSQL_DATABASE=nextcloud
15+
- MYSQL_USER=nextcloud
16+
networks:
17+
default:
18+
ipv4_address: $APP_NEXTCLOUD_DB_IP
19+
20+
redis:
21+
image: redis:6.2.2-buster@sha256:e10f55f92478715698a2cef97c2bbdc48df2a05081edd884938903aa60df6396
22+
user: "1000:1000"
23+
restart: on-failure
24+
volumes:
25+
- "${APP_DATA_DIR}/data/redis:/data"
26+
networks:
27+
default:
28+
ipv4_address: $APP_NEXTCLOUD_REDIS_IP
29+
30+
web:
31+
image: nextcloud:22.0.0-apache@sha256:55de721417c16ff110720217406778e16f1b63154d2e8d42fc7913c37dbe6d50
32+
# Currently needs to be run as root, if we run as uid 1000 this fails
33+
# https://github.com/nextcloud/docker/blob/05026b029d37fc5cd488d4a4a2a79480e39841ba/21.0/apache/entrypoint.sh#L53-L77
34+
# user: "1000:1000"
35+
restart: on-failure
36+
ports:
37+
- ${APP_NEXTCLOUD_PORT}:80
38+
volumes:
39+
- ${APP_DATA_DIR}/data/nextcloud:/var/www/html
40+
environment:
41+
- MYSQL_HOST=${APP_NEXTCLOUD_DB_IP}
42+
- REDIS_HOST=${APP_NEXTCLOUD_REDIS_IP}
43+
- MYSQL_PASSWORD=moneyprintergobrrr
44+
- MYSQL_DATABASE=nextcloud
45+
- MYSQL_USER=nextcloud
46+
- NEXTCLOUD_TRUSTED_DOMAINS=${APP_DOMAIN}:${APP_NEXTCLOUD_PORT} ${APP_HIDDEN_SERVICE}
47+
depends_on:
48+
- db
49+
- redis
50+
networks:
51+
default:
52+
ipv4_address: $APP_NEXTCLOUD_IP
53+
54+
cron:
55+
image: nextcloud:22.0.0-apache@sha256:55de721417c16ff110720217406778e16f1b63154d2e8d42fc7913c37dbe6d50
56+
# Currently needs to be run as root, if we run as uid 1000 this fails
57+
# https://github.com/nextcloud/docker/blob/05026b029d37fc5cd488d4a4a2a79480e39841ba/21.0/apache/entrypoint.sh#L53-L77
58+
# user: "1000:1000"
59+
restart: on-failure
60+
volumes:
61+
- ${APP_DATA_DIR}/data/nextcloud:/var/www/html
62+
entrypoint: /cron.sh
63+
depends_on:
64+
- db
65+
- redis
66+
networks:
67+
default:
68+
ipv4_address: $APP_NEXTCLOUD_CRON_IP

apps/registry.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
11
[
2+
{
3+
"id": "nextcloud",
4+
"category": "Files",
5+
"name": "Nextcloud",
6+
"version": "21.0.2",
7+
"tagline": "Productivity platform that keeps you in control",
8+
"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.",
9+
"developer": "Nextcloud GmbH",
10+
"website": "https://nextcloud.com",
11+
"dependencies": [],
12+
"repo": "https://github.com/nextcloud/server",
13+
"support": "https://help.nextcloud.com/categories",
14+
"port": 8081,
15+
"gallery": [
16+
"1.jpg",
17+
"2.jpg",
18+
"3.jpg"
19+
],
20+
"path": "",
21+
"defaultPassword": "",
22+
"torOnly": false
23+
},
224
{
325
"id": "mempool",
426
"category": "Explorers",

scripts/configure

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ APP_SAMOURAI_SERVER_NODE_IP="10.21.21.25"
158158
APP_BLUEWALLET_LNDHUB_IP="10.21.21.30"
159159
APP_BLUEWALLET_LNDHUB_PORT="3008"
160160
APP_BLUEWALLET_REDIS_IP="10.21.21.31"
161+
APP_NEXTCLOUD_PORT="8081"
162+
APP_NEXTCLOUD_IP="10.21.21.32"
163+
APP_NEXTCLOUD_DB_IP="10.21.21.33"
164+
APP_NEXTCLOUD_REDIS_IP="10.21.21.34"
165+
APP_NEXTCLOUD_CRON_IP="10.21.21.35"
161166

162167
# Generate RPC credentials
163168
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}" "
321326
sed -i "s/<app-bluewallet-lndhub-ip>/${APP_BLUEWALLET_LNDHUB_IP}/g" "${template}"
322327
sed -i "s/<app-bluewallet-lndhub-port>/${APP_BLUEWALLET_LNDHUB_PORT}/g" "${template}"
323328
sed -i "s/<app-bluewallet-redis-ip>/${APP_BLUEWALLET_REDIS_IP}/g" "${template}"
329+
sed -i "s/<app-nextcloud-port>/${APP_NEXTCLOUD_PORT}/g" "${template}"
330+
sed -i "s/<app-nextcloud-ip>/${APP_NEXTCLOUD_IP}/g" "${template}"
331+
sed -i "s/<app-nextcloud-db-ip>/${APP_NEXTCLOUD_DB_IP}/g" "${template}"
332+
sed -i "s/<app-nextcloud-redis-ip>/${APP_NEXTCLOUD_REDIS_IP}/g" "${template}"
333+
sed -i "s/<app-nextcloud-cron-ip>/${APP_NEXTCLOUD_CRON_IP}/g" "${template}"
324334
done
325335

326336
##########################################################

templates/.env-sample

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,8 @@ APP_SAMOURAI_SERVER_NODE_IP=<app-samourai-server-node-ip>
6161
APP_BLUEWALLET_LNDHUB_IP=<app-bluewallet-lndhub-ip>
6262
APP_BLUEWALLET_LNDHUB_PORT=<app-bluewallet-lndhub-port>
6363
APP_BLUEWALLET_REDIS_IP=<app-bluewallet-redis-ip>
64+
APP_NEXTCLOUD_PORT=<app-nextcloud-port>
65+
APP_NEXTCLOUD_IP=<app-nextcloud-ip>
66+
APP_NEXTCLOUD_DB_IP=<app-nextcloud-db-ip>
67+
APP_NEXTCLOUD_REDIS_IP=<app-nextcloud-redis-ip>
68+
APP_NEXTCLOUD_CRON_IP=<app-nextcloud-cron-ip>

templates/torrc-sample

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,8 @@ HiddenServicePort 80 <app-samourai-server-whirlpool-ip>:<app-samourai-server-whi
8484
HiddenServiceDir /var/lib/tor/app-bluewallet
8585
HiddenServicePort 80 <app-bluewallet-lndhub-ip>:<app-bluewallet-lndhub-port>
8686

87+
# nextcloud Hidden Service
88+
HiddenServiceDir /var/lib/tor/app-nextcloud
89+
HiddenServicePort 80 <app-nextcloud-ip>:80
90+
8791
HashedControlPassword <password>

0 commit comments

Comments
 (0)