aboutsummaryrefslogtreecommitdiffstats
path: root/.devcontainer/setup.sh
diff options
context:
space:
mode:
authorRobin Windey <ro.windey@gmail.com>2023-03-27 07:05:27 +0000
committerGitHub <noreply@github.com>2023-03-31 13:53:04 +0000
commita32e8db7031bbb3e183afdf8cabc9b16910dec86 (patch)
treeb1c83168bd14c2ffc86035cc5d98b7b13c63fe45 /.devcontainer/setup.sh
parent79fb336d35953a1bad648e256c5f57eee2809041 (diff)
downloadnextcloud-server-a32e8db7031bbb3e183afdf8cabc9b16910dec86.tar.gz
nextcloud-server-a32e8db7031bbb3e183afdf8cabc9b16910dec86.zip
Minor DevContainer adjustments
* Add gnupg2 to be able to sign commits * Make sure /var/www/html always belongs to www-data * Add Git-History plugin * Introduce dedicated entrypoint script * Store Postgres database data in volume to be persistent * Cleaner check if NC is already installed in setup.sh * Add composer to DevContainer Signed-off-by: GitHub <noreply@github.com>
Diffstat (limited to '.devcontainer/setup.sh')
-rwxr-xr-x.devcontainer/setup.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh
index e3595123b84..aec20f3b4dc 100755
--- a/.devcontainer/setup.sh
+++ b/.devcontainer/setup.sh
@@ -9,9 +9,10 @@ cp .devcontainer/codespace.config.php config/codespace.config.php
# Set git safe.directory
git config --global --add safe.directory /var/www/html
+git config --global --add safe.directory /var/www/html/3rdparty
# Onetime installation setup
-if [ ! -f "data/.devcontainer-install-complete" ]; then
+if [[ ! $(sudo -u www-data php occ status) =~ installed:[[:space:]]*true ]]; then
echo "Running NC installation"
sudo -u www-data php occ maintenance:install \
--verbose \
@@ -22,9 +23,7 @@ if [ ! -f "data/.devcontainer-install-complete" ]; then
--database-user=postgres \
--database-pass=postgres \
--admin-user admin \
- --admin-pass admin && \
- touch "data/.devcontainer-install-complete"
+ --admin-pass admin
fi
-# Clear caches and stuff ...
service apache2 restart