run.sh: Expose ssh at port 2280 and increase PHP memory limit

This commit is contained in:
Ben 2023-07-19 14:13:09 +02:00
parent bf929327c2
commit ccd57b0517
Signed by: ben
GPG Key ID: 1353F41CF1CFF2D3
1 changed files with 9 additions and 1 deletions

10
run.sh
View File

@ -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