From 07d6500700c52cd41545d4f20b45998e52b3b933 Mon Sep 17 00:00:00 2001 From: ne20002 Date: Tue, 6 Aug 2024 14:12:50 +0000 Subject: [PATCH] Updated dev container configuration - moved vscode launch.json to .devcontainer - added forwardPorts to devcontainer.json - create log file in postCreate.sh --- .devcontainer/devcontainer.json | 13 ++++++++++--- .devcontainer/include/autoinstall.config.php | 1 + {.vscode => .devcontainer}/launch.json | 0 .devcontainer/postCreate.sh | 9 +++++++++ .gitignore | 1 - 5 files changed, 20 insertions(+), 4 deletions(-) rename {.vscode => .devcontainer}/launch.json (100%) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4bf546aaba..e94e4d713d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,14 +18,21 @@ "postCreateCommand": "bash -c '.devcontainer/postCreate.sh && .devcontainer/postCreateApacheSetup.sh && .devcontainer/postCreateFriendicaSetup.sh'", "postStartCommand": "service apache2 start", + "forwardPorts": [ + 80, + 443, + 3306, + 8080 + ], + // Configure tool-specific properties. "customizations": { "vscode": { "extensions": [ - "xdebug.php-debug", + "bmewburn.vscode-intelephense-client", "ms-azuretools.vscode-docker", - "donjayamanne.githistory", - "bmewburn.vscode-intelephense-client" + "xdebug.php-debug", + "donjayamanne.githistory" ], "settings": { "php.suggest.basic": false diff --git a/.devcontainer/include/autoinstall.config.php b/.devcontainer/include/autoinstall.config.php index b61ba46c31..57ad41e928 100644 --- a/.devcontainer/include/autoinstall.config.php +++ b/.devcontainer/include/autoinstall.config.php @@ -32,5 +32,6 @@ return [ 'language' => 'en', 'basepath' => '${workspaceFolder}', 'url' => 'http://${ServerName}:${ServerPort}', + 'pidfile' => '/tmp/daemon.pid', ], ]; diff --git a/.vscode/launch.json b/.devcontainer/launch.json similarity index 100% rename from .vscode/launch.json rename to .devcontainer/launch.json diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index e5b338d93d..d7072f38b5 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -8,6 +8,9 @@ source $workspaceFolder/.devcontainer/.env echo ">>> Development Setup" sudo apt-get update +# VSCode debugger profile +mkdir -p .vscode && cp .devcontainer/launch.json .vscode/launch.json + envsubst < $workspaceFolder/.devcontainer/include/my.cnf > /home/vscode/.my.cnf #Make the workspace directory the docroot @@ -17,4 +20,10 @@ sudo ln -fs $workspaceFolder $DocumentRoot echo 'error_reporting=0' | sudo tee /usr/local/etc/php/conf.d/no-warn.ini +# create log file +mkdir -p log +touch log/friendica.log +chmod 666 log/friendica.log + + exit 0 diff --git a/.gitignore b/.gitignore index ce397308bf..3a673832bd 100644 --- a/.gitignore +++ b/.gitignore @@ -39,7 +39,6 @@ robots.txt #Ignore config files from VSCode /.vscode/ -!/.vscode/launch.json #ignore smarty cache /view/smarty3/compiled/