-
Notifications
You must be signed in to change notification settings - Fork 11
/
setup-test-server.sh
executable file
·33 lines (26 loc) · 1.24 KB
/
setup-test-server.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# when you ssh into a new empty ubuntu server:
#
# git clone https://github.com/pdsinterop/solid-nextcloud
# cd solid-nextcloud
# export HOST=your.host.com
# export MARIADB_ROOT_PASSWORD=...
# /bin/bash ./setup-test-server.sh
#
# that runs this script :)
# you will get some interactive questions from LetsEncrypt certbot.
echo Setting up full nextcloud-solid server for $HOST
apt update
apt install -y docker certbot
certbot certonly --standalone
mkdir -p /root/tls
cp /etc/letsencrypt/live/$HOST/fullchain.pem /root/tls/server.cert
cp /etc/letsencrypt/live/$HOST/privkey.pem /root/tls/server.key
cd /root/solid-nextcloud
docker build -t solid-nextcloud .
docker build -t pubsub-server https://github.com/pdsinterop/php-solid-pubsub-server.git#main
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
docker run -d --name=nextcloud --network=host -v /root/tls:/tls solid-nextcloud
# docker run -d --name-pubsub --network=host -v /root/tls:/tls pubsub-server
sleep 15
docker exec -u www-data -it -e HOST=$HOST -e MARIADB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD nextcloud sh /init-live.sh