Skip to content

Commit ac1835f

Browse files
committed
Merge branch 'master' of github.com:parallax/k8s-openresty-php
2 parents 4bf18ce + 0765cb9 commit ac1835f

File tree

8 files changed

+3182
-5
lines changed

8 files changed

+3182
-5
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ For help running these locally with docker run see the [docker run reference](ht
3636
| SITE_BRANCH | The running branch of your project, i.e. 'master'. Used by NR for app name. ||||
3737
| ENVIRONMENT | The environment you're running in, i.e. 'qa' or 'production'. Used by NR for app name. ||||
3838
| ATATUS_APM_LICENSE_KEY | Your Atatus license key. Atatus won't be used if this is not set. ||||
39+
| ATATUS_FRAMEWORK | Manually set the Atatus framework (see Atatus docs, typically "Laravel" or "Symfony") ||||
3940
| ATATUS_APM_RAW_SQL | Set to any value (1, true, etc) to use raw sql logging into Atatus ||||
4041
| PHP_MEMORY_MAX | Maximum PHP request memory, in megabytes (i.e. '256'). Defaults to 128. ||||
4142
| MAX_EXECUTION_TIME | Maximum PHP and Nginx execution/fastcgi read timeout ||||

openresty/conf/default.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
map $http_host $robots {
2+
~.parallax.dev 'noindex, nofollow';
3+
default '';
4+
}
5+
16
server {
27
listen 80 default_server;
38

49
root /src-shared/public;
510

611
add_header Pod $hostname;
12+
add_header X-Robots-Tag $robots;
713

814
index index.php index.html index.htm;
915

@@ -69,4 +75,4 @@ server {
6975
internal;
7076
}
7177

72-
}
78+
}

php/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM alpine:3.9
22

33
ARG PHP_VERSION=7.3
4-
ARG ATATUS_VERSION=1.9.0
4+
ARG ATATUS_VERSION=1.12.0
55
ARG ATATUS_ENABLED=TRUE
66

77
ENV \

php/Dockerfile-5.6

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM alpine:3.8
22

33
ARG PHP_VERSION=5.6
4-
ARG ATATUS_VERSION=1.9.0
4+
ARG ATATUS_VERSION=1.12.0
55
ARG ATATUS_ENABLED=TRUE
66

77
ENV \
@@ -187,6 +187,11 @@ ADD /php/conf/php-fpm.conf /etc/php/current/php-fpm.conf
187187
ADD /php/conf/php.ini /etc/php/current/php.ini
188188
ADD /php/conf/php-www.conf /etc/php/current/php-fpm.d/www.conf
189189

190+
# Root CA override
191+
ADD /php/conf/root.cer /etc/root-ca/root.cer
192+
RUN sed -i -e 's#;curl.cainfo =#curl.cainfo="/etc/root-ca/root.cer"#g' /etc/php5/php.ini
193+
RUN sed -i -e 's#;openssl.cafile=#openssl.cafile="/etc/root-ca/root.cer"#g' /etc/php5/php.ini
194+
190195
# Clear out garbage
191196
RUN unset DEPS && rm -rf /run/php && rm -rf /run/php-fpm7.3
192197

php/Dockerfile-7.4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM alpine:3.14
22

3-
ARG ATATUS_VERSION=1.9.0
3+
ARG ATATUS_VERSION=1.12.0
44
ARG ATATUS_ENABLED=TRUE
55

66
ENV \

php/Dockerfile-8.0

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM alpine:3.14
22

33
ARG PHP_VERSION=8
4-
ARG ATATUS_VERSION=1.11.0
4+
ARG ATATUS_VERSION=1.12.0
55
ARG ATATUS_ENABLED=TRUE
66

77
ENV \

php/conf/root.cer

Lines changed: 3154 additions & 0 deletions
Large diffs are not rendered by default.

php/scripts/configure.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ if [ ! -z "$ATATUS_APM_LICENSE_KEY" ] && [ "$ATATUS_APM_LICENSE_KEY" != "test" ]
6363
sed -i -e "s/atatus.sql.capture = \"normalized\"/atatus.sql.capture = \"raw\"/g" /etc/php/current/conf.d/atatus.ini
6464

6565
fi
66+
67+
# Atatus - configure framework in use manually if set
68+
if [ ! -z "$ATATUS_FRAMEWORK" ]; then
69+
70+
# Enabled
71+
printf "\e[94m%-30s\e[0m \e[35m%-30s\e[0m\n" "Atatus Framework:" "$ATATUS_FRAMEWORK"
72+
73+
# Set the atatus framework
74+
sed -i -e "s/atatus.framework = \"\"/atatus.framework = \"$ATATUS_FRAMEWORK\"/g" /etc/php/current/conf.d/atatus.ini
75+
76+
fi
6677

6778
# Atatus - configure laravel queues if desirable
6879
if [ -z "$ATATUS_APM_DISABLE_LARAVEL_QUEUES" ]; then

0 commit comments

Comments
 (0)