commit 21409df534514f3b7f9c1129964890e80b77c783 Author: Andreas Demmelbauer Date: Tue Jan 26 23:54:20 2021 +0100 first commit diff --git a/install-everything.sh b/install-everything.sh new file mode 100644 index 0000000..f5d79c1 --- /dev/null +++ b/install-everything.sh @@ -0,0 +1,134 @@ +#!/bin/bash + + +# Warning: This BASH script is UNTESTED !!! +# Before you start: Set DNS Record of Domain Name to this servers IP + +# More Infos: https://help.nextcloud.com/t/onlyoffice-compiled-with-mobile-edit-back/79282 + +# Change your parameters here: +DOMAIN_NAME="office.notice.at" +CERT_EMAIL="certbot-announcements@notice.at" +SECRET="changeme" + +# Select Container (should already be ok) +CONTAINER_NAME="nemskiller007/officeunleashed" + +# Install Docker +apt-get update +apt-get install docker docker.io + +# Install Docker Image +docker pull $CONTAINER_NAME + +# Run Docker Image +docker run -i -t -d -p 8000:80 --restart=always $CONTAINER_NAME + +# Lookup Container ID +# Manually: docker ps -a +CONTAINER_ID=$(docker ps -aqf "$CONTAINER_NAME") + +# Change passwords (secret) +# Set request/inbox and request/outbox to true + + +# MANUAL approach: +#docker exec -it $CONTAINER_ID /bin/bash +#nano /out/linux_64/onlyoffice/documentserver/server/Common/config/default.jsoni + +# Go on line 155 and replace every string with secret +# written in it with your own password : +# Example: +# "browser": {"string": "myNewSuperSecurePassw0rd", "file": "", "tenants": {}}, +# +# Then on line 163 to 170 change all false by true +# Example: +# "request": { +# "inbox": true, +# "outbox": true +# } + +#exit + +# Automated approach: +CONFIG_PATH="/out/linux_64/onlyoffice/documentserver/server/Common/config/default.json" +docker exec -i $CONTAINER_ID bash </etc/nginx/sites-available/$DOMAIN_NAME <