You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Nextcloud DevContainer
  2. ## Usage
  3. Make sure you have the [VSCode DevContainer](https://code.visualstudio.com/docs/devcontainers/containers) extensions installed. If you open the project, VSCode will ask you if you want to open it inside of the DevContainer. If that's not the case, use <kbd>F1</kbd>&rarr;*Dev Containers: Open Folder in Container*.
  4. Alternatively open the project directly in [GitHub Codespaces](https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=60243197&skip_quickstart=true).
  5. That's already it. Everything else will be configured automatically by the Containers startup routine.
  6. ## Credentials
  7. On first start the Container installs and configures Nextcloud with the following credentials:
  8. **Nextcloud Admin Login**
  9. Username: `admin` <br>
  10. Password: `admin`
  11. **Postgres credentials**
  12. Username: `postgres` <br>
  13. Password: `postgres` <br>
  14. Database: `postgres`
  15. ## Services
  16. The following services will be started:
  17. | Service | Local port | Description |
  18. |---------|------------|-------------|
  19. | Nextcloud (served via Apache) | `80` | The main application |
  20. | Mailhog | `8025` | SMTP email delivery for testing |
  21. | Adminer | `8080` | Database viewer. Use credentials from above and connect to `localhost` to get access to the NC database |
  22. ## Permissions
  23. The container runs with the user `devcontainer` who is also running the Apache2 process. All mounted source files have
  24. proper permissions so that this user can access everything which is inside the current workspace. If you need to
  25. get root permissions for whatever reason, use `sudo su` or `sudo <command>` (for example `sudo service apache2 restart`).
  26. Everything else (like building the application, adjusting files, ...) should be done as `devcontainer` user.
  27. ## NodeJs and NVM
  28. The container comes with [`nvm`](https://github.com/nvm-sh/nvm) and Node 16 installed. This should be sufficient to
  29. build Nextcloud Core sources via `make`. If you need a different Node Version (for example for
  30. app development), you can easily switch between different versions by running:
  31. ```bash
  32. # Install and use Node 14
  33. nvm install 14
  34. nvm use 14
  35. # Check version
  36. node -v
  37. # Switch back to Node 16
  38. nvm use 16
  39. # Check version
  40. node -v
  41. ```
  42. Note that `nvm` is only installed for the user `devcontainer` and won't work out of the box for
  43. any other user.
  44. ## Debugging
  45. The Apache webserver is already configured to automatically try to connect to a debugger process
  46. listening on port `9003`. To start the VSCode debugger process, use the delivered debug profile `Listen for XDebug`.
  47. After you started the VSCode debugger, just navigate to the appropriate Nextcloud URL to get your
  48. debug hits.