Skip to content

Commit

Permalink
feat: add devcontainer for development
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Sep 21, 2024
1 parent ad3a1ef commit 9ecdcbb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"image": "ghcr.io/juliushaertl/nextcloud-dev-php81:latest",
"forwardPorts": [80],
"containerEnv": {
"NEXTCLOUD_AUTOINSTALL_APPS": "news",
"XDEBUG_MODE": "debug"
},
"customizations": {
"vscode": {
"extensions": [
"felixfbecker.php-intellisense",
"octref.vetur"
],
"settings": {
"php.suggest.basic": false,
"git.alwaysSignOff": true
}
}
},
"workspaceMount": "source=${localWorkspaceFolder},target=/var/www/html/apps-extra/news,type=bind",
"workspaceFolder": "/var/www/html/apps-extra/news",
"overrideCommand": true,
"postAttachCommand": "bash ./.devcontainer/setup.sh",
"portsAttributes": {
"80": {
"label": "Webserver"
}
}
}
11 changes: 11 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: CC0-1.0

(
cd /tmp && /usr/local/bin/bootstrap.sh apache2ctl start
)

make composer
make npm

0 comments on commit 9ecdcbb

Please sign in to comment.