Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions 20.0/apache/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi

if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi
Expand Down
4 changes: 4 additions & 0 deletions 20.0/fpm-alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi

if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi
Expand Down
4 changes: 4 additions & 0 deletions 20.0/fpm/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi

if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
fi
else
echo "running web-based installer on first connect!"
fi
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ One or more trusted domains can be set through environment variable, too. They w

- `NEXTCLOUD_TRUSTED_DOMAINS` (not set by default) Optional space-separated list of domains

To install custom apps, or execute occ commands, you can provide the path to a script that is run in the context of the www-data user.

- `NEXTCLOUD_CUSTOM_INSTALL_SCRIPT` (not set by default) The path to a script that is mounted as volume.

The install and update script is only triggered when a default command is used (`apache-foreground` or `php-fpm`). If you use a custom command you have to enable the install / update with

- `NEXTCLOUD_UPDATE` (default: _0_)
Expand Down
4 changes: 4 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1))
done
fi

if [ -n "${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT+x}" ]; then
run_as "/bin/sh ${NEXTCLOUD_CUSTOM_INSTALL_SCRIPT}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this but are there any common use cases where you don't want to run_as limited user?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only use case I see may be adding distrib packages, but I think that building a custom image is better here.

fi
else
echo "running web-based installer on first connect!"
fi
Expand Down