[web-php] master: now everything starts up automatically
| From: | Garrett W. via Derick Rethans | Date: | Thu, 31 Jul 2025 16:59:29 +0000 |
| Subject: | [web-php] master: now everything starts up automatically | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-33057@lists.php.net to get a copy of this message | ||
Author: Garrett W. (garrettw)
Committer: Derick Rethans (derickr)
Date: 2025-07-31T17:45:27+01:00
Commit: https://github.com/php/web-php/commit/99388afd4eb0660d43cef2584e78e0c09562db00
Raw diff: https://github.com/php/web-php/commit/99388afd4eb0660d43cef2584e78e0c09562db00.diff
now everything starts up automatically
Changed paths:
A .devcontainer/post-create.sh
M .devcontainer/devcontainer.json
Diff:
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 242ad11d99..15ba61a15b 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -31,7 +31,11 @@
],
// Use 'postCreateCommand' to run commands after the container is created.
- "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf
/var/www/html && sudo ln -s \"$(pwd)\" /var/www/html; test -f composer.json
&& composer install"
+ "postCreateCommand": "sudo .devcontainer/post-create.sh && sudo chmod
a+x \"$(pwd)\" && sudo ln -s \"$(pwd)\" /var/www/html",
+ "waitFor": "postCreateCommand",
+ "postAttachCommand": {
+ "Server": "apache2ctl start"
+ }
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh
new file mode 100755
index 0000000000..c7161b9344
--- /dev/null
+++ b/.devcontainer/post-create.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+test -f composer.json && composer install
+
+sed -i 's/Listen 80$//' /etc/apache2/ports.conf \
+ && sed -i 's/<VirtualHost \*:80>/ServerName 127.0.0.1\n<VirtualHost
\*:8080>/' /etc/apache2/sites-enabled/000-default.conf \
+ && rm -rf /var/www/html