Skip to content

Commit

Permalink
chore: Updated sample application and Dockerfile for docker-php deplo…
Browse files Browse the repository at this point in the history
…y config
  • Loading branch information
pchinthapenta committed Feb 29, 2024
1 parent 994a36a commit 964fe66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/deploy/linux/php/docker-templates/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM php:8.2-cli
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
EXPOSE 88
EXPOSE 80
CMD [ "php", "index.php" ]
9 changes: 7 additions & 2 deletions test/deploy/linux/php/docker-templates/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
// Function to print "Hello, World!"
function printHelloWorld() {
echo "Hello, World!\n";
ob_flush();
flush();
if (extension_loaded('newrelic')) { // Ensure PHP agent is available
newrelic_background_job(false);
}
if (ob_get_length()) {
ob_flush();
flush();
}
}

// Print "Hello, World!" initially
Expand Down

0 comments on commit 964fe66

Please sign in to comment.