aboutsummaryrefslogtreecommitdiffstats
path: root/.devcontainer/README.md
diff options
context:
space:
mode:
authorRobin Windey <ro.windey@gmail.com>2023-03-31 06:40:04 +0000
committerGitHub <noreply@github.com>2023-03-31 13:53:05 +0000
commitdfbd1fbe79fb8201257a6c52352042586100e41e (patch)
treec3460aa15b45bea38771bb8e282cf24645991c44 /.devcontainer/README.md
parenta32e8db7031bbb3e183afdf8cabc9b16910dec86 (diff)
downloadnextcloud-server-dfbd1fbe79fb8201257a6c52352042586100e41e.tar.gz
nextcloud-server-dfbd1fbe79fb8201257a6c52352042586100e41e.zip
Dedicated DevContainer user + NVM
* Use dedicated DevContainer user to run Apache (ensure file permissions) * Install NVM for node Signed-off-by: GitHub <noreply@github.com>
Diffstat (limited to '.devcontainer/README.md')
-rw-r--r--.devcontainer/README.md39
1 files changed, 38 insertions, 1 deletions
diff --git a/.devcontainer/README.md b/.devcontainer/README.md
index b1c8ed6d340..da540711fc8 100644
--- a/.devcontainer/README.md
+++ b/.devcontainer/README.md
@@ -31,5 +31,42 @@ The following services will be started:
|---------|------------|-------------|
| Nextcloud (served via Apache) | `80` | The main application |
| Mailhog | `8025` | SMTP email delivery for testing |
-| Adminer | `8080` | Database viewer. Use credentials from above and connect to `localhost:5432` to get access to the NC database |
+| Adminer | `8080` | Database viewer. Use credentials from above and connect to `localhost` to get access to the NC database |
+## Permissions
+
+The container runs with the user `devcontainer` who is also running the Apache2 process. All mounted source files have
+proper permissions so that this user can access everything which is inside the current workspace. If you need to
+get root permissions for whatever reason, use `sudo su` or `sudo <command>` (for example `sudo service apache2 restart`).
+Everything else (like building the application, adjusting files, ...) should be done as `devcontainer` user.
+
+## NodeJs and NVM
+
+The container comes with [`nvm`](https://github.com/nvm-sh/nvm) and Node 16 installed. This should be sufficient to
+build Nextcloud Core sources via `make`. If you need a different Node Version (for example for
+app development), you can easily switch between different versions by running:
+
+```bash
+# Install and use Node 14
+nvm install 14
+nvm use 14
+
+# Check version
+node -v
+
+# Switch back to Node 16
+nvm use 16
+
+# Check version
+node -v
+```
+
+Note that `nvm` is only installed for the user `devcontainer` and won't work out of the box for
+any other user.
+
+## Debugging
+
+The Apache webserver is already configured to automatically try to connect to a debugger process
+listening on port `9003`. To start the VSCode debugger process, use the delivered debug profile `Listen for XDebug`.
+After you started the VSCode debugger, just navigate to the appropriate Nextcloud URL to get your
+debug hits. \ No newline at end of file