Skip to content

Commit b56241d

Browse files
committed
Enable some new features. Update to latest versions.
1 parent 66a4955 commit b56241d

File tree

8 files changed

+78
-28
lines changed

8 files changed

+78
-28
lines changed

api/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
44

55
###> symfony/framework-bundle ###
6-
APP_ENV=dev
6+
APP_ENV=prod
77
APP_SECRET=!ChangeMe!
88
TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
99
TRUSTED_HOSTS=localhost,api

api/.php_cs.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"php":"7.2.6","version":"2.11.1","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_constants":true,"lowercase_keywords":true,"method_argument_space":{"ensure_fully_multiline":true},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true},"hashes":{"src\/\/Entity\/Book.php":3743908103,"src\/\/Entity\/Review.php":4281022700,"src\/\/Kernel.php":740139742}}

api/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ WORKDIR /srv/api
4444
# Build for production
4545
ARG APP_ENV=prod
4646

47+
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
48+
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/alpine/amd64/$version \
49+
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
50+
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
51+
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini
52+
4753
# Prevent the reinstallation of vendors at every changes in the source code
4854
COPY composer.json composer.lock ./
4955
RUN composer install --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress --no-suggest \

api/bin/var-dump-server

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../vendor/symfony/var-dumper/Resources/bin/var-dump-server

api/composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
{
22
"type": "project",
33
"license": "MIT",
4+
"repositories": [
5+
{
6+
"type": "vcs",
7+
"url": "https://github.com/dunglas/core"
8+
}
9+
],
410
"require": {
511
"php": "^7.1.3",
612
"ext-iconv": "*",
713
"api-platform/api-pack": "^1.0",
8-
"api-platform/core": "^2.2",
14+
"api-platform/core": "dev-serializer-41 as 2.3",
915
"guzzlehttp/guzzle": "^6.3",
1016
"nelmio/cors-bundle": "^1.5",
1117
"sensiolabs/security-checker": "^4.1",

api/composer.lock

Lines changed: 46 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
SensioLabs\Security\SecurityChecker:
3+
public: false
4+
5+
SensioLabs\Security\Command\SecurityCheckerCommand:
6+
arguments: ['@SensioLabs\Security\SecurityChecker']
7+
public: false
8+
tags:
9+
- { name: console.command, command: 'security:check' }

docker-compose.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,12 @@ services:
108108
- "8443:8443"
109109
- "8444:8444"
110110

111+
blackfire:
112+
image: blackfire/blackfire
113+
environment:
114+
# Exposes the host BLACKFIRE_SERVER_ID and TOKEN environment variables.
115+
- BLACKFIRE_SERVER_ID
116+
- BLACKFIRE_SERVER_TOKEN
117+
111118
volumes:
112119
db-data: {}

0 commit comments

Comments
 (0)