Skip to content

Commit 34af9ed

Browse files
-
1 parent df5e03a commit 34af9ed

File tree

6 files changed

+7
-3
lines changed

6 files changed

+7
-3
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Dockerfile
3838
docs
3939
phpunit.xml.dist
4040
screenshots
41-
src/Command
4241
src/DataFixtures
4342
tests
4443
update.sh

.env.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ APP_SECRET=fda41e68dccbce19b1829cb12cc5d89f
2121
###< symfony/framework-bundle ###
2222

2323
###> app ###
24+
INSTALLATION_TYPE=source
2425
ELASTICSEARCH_URL=http://localhost:9200
2526
ELASTICSEARCH_USERNAME=
2627
ELASTICSEARCH_PASSWORD=

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ FROM alpine:edge
33
LABEL Maintainer="Tim de Pater <code@trafex.nl>" \
44
Description="Lightweight container with Nginx 1.18 & PHP-FPM 7.3 based on Alpine Linux."
55

6+
ENV INSTALLATION_TYPE=docker
67
ENV ELASTICSEARCH_URL=$ELASTICSEARCH_URL
78
ENV ELASTICSEARCH_USERNAME=$ELASTICSEARCH_USERNAME
89
ENV ELASTICSEARCH_PASSWORD=$ELASTICSEARCH_PASSWORD
@@ -14,7 +15,7 @@ ENV SECRET_REGISTER=$SECRET_REGISTER
1415
RUN apk --update add php7 php7-fpm php7-opcache php7-json php7-openssl php7-curl \
1516
php7-zlib php7-xml php7-simplexml php7-phar php7-intl php7-dom php7-xmlreader php7-ctype php7-session \
1617
php7-tokenizer php7-pdo php7-pdo_mysql php7-pdo_pgsql php7-iconv php7-zip \
17-
php7-mbstring nginx supervisor nodejs nodejs npm curl && \
18+
php7-gmp php7-mbstring nginx supervisor nodejs nodejs npm curl && \
1819
rm /etc/nginx/conf.d/default.conf
1920

2021
# Configure nginx

config/services.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ services:
1212
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
1313
bind:
1414
$appEnv: '%env(APP_ENV)%'
15+
$installationType: '%env(INSTALLATION_TYPE)%'
1516
$elasticsearchUrl: '%env(ELASTICSEARCH_URL)%'
1617
$elasticsearchUsername: '%env(ELASTICSEARCH_USERNAME)%'
1718
$elasticsearchPassword: '%env(ELASTICSEARCH_PASSWORD)%'

src/Controller/AppExceptionController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class AppExceptionController extends AbstractAppController
1515
{
16-
public function read(Request $request, FlattenException $exception, RequestStack $requestStack, Security $security)
16+
public function read(Request $request, FlattenException $exception, RequestStack $requestStack, Security $security, string $installationType)
1717
{
1818
$masterRequest = $requestStack->getMasterRequest();
1919

@@ -51,6 +51,7 @@ public function read(Request $request, FlattenException $exception, RequestStack
5151
$parameters['file'] = $exception->getFile();
5252
$parameters['line'] = $exception->getLine();
5353

54+
$parameters['installation_type'] = $installationType;
5455
$parameters['php_version'] = phpversion();
5556
$parameters['symfony_version'] = Kernel::VERSION;
5657
}

templates/Modules/exception/exception_500.html.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
</ul>
1515

1616
<ul class="list-unstyled">
17+
<li>Installation type: {{ installation_type }}</li>
1718
<li>PHP version: {{ php_version }}</li>
1819
<li>Symfony version: {{ symfony_version }}</li>
1920
<li>Elasticsearch version: {{ root['version']['number'] }}</li>

0 commit comments

Comments
 (0)