Created Nextcloud installation script. Could not test because I could not set up reverse proxy correctly.
This commit is contained in:
parent
d91bf0e581
commit
a42690c99b
1 changed files with 39 additions and 0 deletions
39
nextcloud_install.sh
Executable file
39
nextcloud_install.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$ZFS_DIR" ]
|
||||
then
|
||||
ZFS_DIR=/data
|
||||
fi
|
||||
|
||||
if [ -z "$APACHE_COMM" ]
|
||||
then
|
||||
./create_reverse_proxy.sh
|
||||
fi
|
||||
|
||||
if [ SYS_MEM -gt 2097152 ]
|
||||
then
|
||||
let "SYS_MEM = $SYS_MEM - 1048576"
|
||||
else
|
||||
let "SYS_MEM = $SYS_MEM / 2"
|
||||
fi
|
||||
|
||||
echo "Installing Nextcloud AIO ..."
|
||||
let "AIO_MEM = $SYS_MEM / 1024"
|
||||
|
||||
sudo docker run \
|
||||
--sig-proxy=false \
|
||||
--name nextcloud-aio-mastercontainer \
|
||||
--restart always \
|
||||
--publish 11080:80 \
|
||||
--publish 8080:8080 \
|
||||
--publish 11443:8443 \
|
||||
--env NEXTCLOUD_DATADIR=${ZFS_DIR}/nextcloud/data \
|
||||
--env NEXTCLOUD_MOUNT=${ZFS_DIR}/nextcloud \
|
||||
--env APACHE_PORT=${APACHE_PORT} \
|
||||
--env APACHE_IP_BINDING=${APACHE_COMM} \
|
||||
--env NEXTCLOUD_MEMORY_LIMIT=${AIO_MEM}M \
|
||||
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
nextcloud/all-in-one:latest
|
||||
|
||||
echo "Successfully installed Nextcloud AIO"
|
||||
Loading…
Add table
Add a link
Reference in a new issue