Skip to content

Commit a3fa5b2

Browse files
more complete setup script for test servers
1 parent 50865a7 commit a3fa5b2

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

setup-test-server.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,31 @@
44
#
55
# git clone https://github.com/pdsinterop/solid-nextcloud
66
# cd solid-nextcloud
7+
# export HOST=your.host.com
8+
# export MARIADB_ROOT_PASSWORD=...
79
# /bin/bash ./setup-test-server.sh
810
#
911
# that runs this script :)
12+
# you will get some interactive questions from LetsEncrypt certbot.
13+
14+
echo Setting up full nextcloud-solid server for $HOST
1015

1116
apt update
1217
apt install -y docker certbot
1318
certbot certonly --standalone
19+
mkdir -p /root/tls
20+
cp /etc/letsencrypt/live/$HOST/fullchain.pem /root/tls/server.cert
21+
cp /etc/letsencrypt/live/$HOST/privkey.pem /root/tls/server.key
22+
cd /root/solid-nextcloud
1423
docker build -t solid-nextcloud .
15-
docker build -t pubsub-server https://github.com/pdsinterop/php-solid-pubsub-server.git#main
24+
docker build -t pubsub-server https://github.com/pdsinterop/php-solid-pubsub-server.git#main
25+
26+
27+
docker run -d --network=host -e MARIADB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD --name=db mariadb --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
28+
docker run -d --name=nextcloud --network=host -v /root/tls:/tls solid-nextcloud
29+
# docker run -d --name-pubsub --network=host -v /root/tls:/tls pubsub-server
30+
31+
sleep 15
32+
33+
docker exec -u www-data -it -e SERVER_ROOT=https://$HOST nextcloud sh /init.sh
34+
docker exec -u www-data -it -e SERVER_ROOT=https://$HOST nextcloud sed -i "28 i\ 4 => '$HOST'," /var/www/html/config/config.php

0 commit comments

Comments
 (0)