Skip to content

Commit 964fe66

Browse files
committed
chore: Updated sample application and Dockerfile for docker-php deploy config
1 parent 994a36a commit 964fe66

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM php:8.2-cli
22
COPY . /usr/src/myapp
33
WORKDIR /usr/src/myapp
4-
EXPOSE 88
4+
EXPOSE 80
55
CMD [ "php", "index.php" ]

test/deploy/linux/php/docker-templates/index.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
// Function to print "Hello, World!"
66
function printHelloWorld() {
77
echo "Hello, World!\n";
8-
ob_flush();
9-
flush();
8+
if (extension_loaded('newrelic')) { // Ensure PHP agent is available
9+
newrelic_background_job(false);
10+
}
11+
if (ob_get_length()) {
12+
ob_flush();
13+
flush();
14+
}
1015
}
1116

1217
// Print "Hello, World!" initially

0 commit comments

Comments
 (0)