From: ne20002 Date: Tue, 6 Aug 2024 14:12:50 +0000 (+0000) Subject: Updated dev container configuration X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=07d6500700c52cd41545d4f20b45998e52b3b933;p=friendica.git Updated dev container configuration - moved vscode launch.json to .devcontainer - added forwardPorts to devcontainer.json - create log file in postCreate.sh --- 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/.devcontainer/launch.json b/.devcontainer/launch.json new file mode 100644 index 0000000000..7a99e991cc --- /dev/null +++ b/.devcontainer/launch.json @@ -0,0 +1,19 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for Xdebug", + "type": "php", + "request": "launch", + "port": 9000, + "runtimeArgs": [ + "-dzend_extension=xdebug.so", + "-dxdebug.mode=debug", + "-dxdebug.start_with_request=yes", + "-dxdebug.client_host=127.0.0.1", + "-dxdebug.client_port=9000", + "-dxdebug.log=/tmp/xdebug.log" + ] + } + ] +} 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/ diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 7a99e991cc..0000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Listen for Xdebug", - "type": "php", - "request": "launch", - "port": 9000, - "runtimeArgs": [ - "-dzend_extension=xdebug.so", - "-dxdebug.mode=debug", - "-dxdebug.start_with_request=yes", - "-dxdebug.client_host=127.0.0.1", - "-dxdebug.client_port=9000", - "-dxdebug.log=/tmp/xdebug.log" - ] - } - ] -}