diff --git a/run.sh b/run.sh index bfa253a..2294d41 100755 --- a/run.sh +++ b/run.sh @@ -38,13 +38,21 @@ $CONTAINER_RUNTIME run -d \ -p 8081:80 \ -p 8082:8082 \ -p 8008:8008 \ + -p 2280:22 \ + -e PHP_MEMORY_LIMIT=512M \ -v "$DIR:/var/www/html/custom_apps/upschooling" \ --add-host "synapse:127.0.0.1" \ docker.io/nextcloud echo -e "Nextcloud has started. \e[1;38;5;2mOK\033[0m" -$CONTAINER_RUNTIME exec nextcloud bash -c 'apt-get update && apt-get install -y git' +$CONTAINER_RUNTIME exec nextcloud bash -c 'apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y git openssh-server' +# sets www-data password to extrasecret +$CONTAINER_RUNTIME exec nextcloud usermod \ + --password '$6$bpNXAZwf$Xt.BzPV.mNTx5qVJQLK9Lut4VqMcrotgDHdcSZ0SwMxz2k9KVMSpAU7QmCv5vqj87ykIErYGpj9.Hb0A/XpX81' \ + --shell '/bin/bash' \ + www-data +$CONTAINER_RUNTIME exec nextcloud /etc/init.d/ssh start $CONTAINER_RUNTIME exec nextcloud chown -R 33 /var/www/html/custom_apps if [[ $(id -u) -ne 0 && $RUNTIME_IS_PODMAN == "true" ]]; then