Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit dbd53cd

Browse files
author
Lukasz D. Tulikowski
authored
Merge pull request #21 from tulik/backfire-kubernetes-pod
Add blackfire pod
2 parents e4efe33 + 3f0ac0f commit dbd53cd

File tree

5 files changed

+53
-10
lines changed

5 files changed

+53
-10
lines changed

.env

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
# Table of content
1111
- [See it working! Deployed with Travis and Kubernetes](#see-it-working)
12-
- [Table of content](#table-of-content)
1312
- [Environment architecture](#environment-architecture)
1413
- [Quick start](#quick-start)
1514
- [Video tuturial](#video-tuturial)
@@ -25,6 +24,8 @@
2524
<img src="https://raw.githubusercontent.com/tulik/symfony-4-docker-runtime-env/master/documentation/images/schema.png">
2625
</p>
2726

27+
Now it has mocked support for MySQL databases.
28+
2829
# Quick start
2930

3031
```
@@ -41,6 +42,13 @@ Wait for containers to start, then to [http://localhost](http://localhost)
4142
alt="Setup Symfony 4 with Docker in 5 minutes" width="480" height="320" border="0" /></a>
4243
</p>
4344

45+
## Blackfire profiler
46+
**[Blackfire.io](https://blackfire.io)** is continuous PHP Performance Testing.
47+
48+
Register your trial, be able to profile both in development and with a paid subscription in production too!
49+
Don't forget to get your **[Blackfire Companion](https://blackfire.io/docs/integrations/chrome)**.
50+
51+
[See call graph](https://blackfire.io/profiles/54e07b00-ead8-4d3b-a471-9334b3d28354/graph)
4452

4553
# Directory structure
4654
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: {{ template "name" . }}-blackfire
5+
labels:
6+
app: {{ template "name" . }}-blackfire
7+
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
8+
release: {{ .Release.Name }}
9+
heritage: {{ .Release.Service }}
10+
11+
spec:
12+
replicas: {{ .Values.blackfire.replicaCount }}
13+
template:
14+
metadata:
15+
labels:
16+
app: {{ template "name" . }}-blackfire
17+
release: {{ .Release.Name }}
18+
spec:
19+
containers:
20+
- name: {{ .Chart.Name }}-blackfire
21+
image: "{{ .Values.blackfire.repository }}:{{ .Values.blackfire.tag }}"
22+
env:
23+
- name: BLACKFIRE_SERVER_ID
24+
value: {{ .Values.blackfire.blackfire_server_id }}
25+
- name: BLACKFIRE_SERVER_TOKEN
26+
value: {{ .Values.blackfire.blackfire_server_token }}
27+
imagePullPolicy: {{ .Values.blackfire.pullPolicy }}
28+
ports:
29+
- containerPort: 8707
30+
resources:
31+
{{ toYaml .Values.resources | indent 12 }}
32+
{{- if .Values.nodeSelector }}
33+
nodeSelector:
34+
{{ toYaml .Values.nodeSelector | indent 8 }}
35+
{{- end }}

helm/symfony/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ nginx:
1919
pullPolicy: Always
2020
replicaCount: 1
2121

22+
blackfire:
23+
repository: blackfire/blackfire
24+
tag: latest
25+
blackfire_server_id: 0ee01eff-ef1e-4874-9fb5-42e9fed8c66d
26+
blackfire_server_token: c777e5620cbb9045b8c8072371f9350ee15930fc5d3c412f540f09ff6b072cea
27+
28+
2229

2330
ingress:
2431
annotations:

symfony/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ DaTABASE_URL=postgres://symfony:symfony@postgres/symfony
1616
# DATABASE_URL=mysql://root:root@mysql:3306/symfony
1717
###< doctrine/doctrine-bundle ###
1818

19-
###> blackfire.io ###
19+
###> blackfire.io secrets ~> replace with yours SECRETS #####
2020
BLACKFIRE_CLIENT_ID=d29ef9e1-2f41-447c-aa5f-026f7970ead6
2121
BLACKFIRE_CLIENT_TOKEN=e49229d406cc07b0dc4672aadb2d16636c694018ee4e4fd12a85aef0073a46eb
2222
BLACKFIRE_SERVER_ID=0ee01eff-ef1e-4874-9fb5-42e9fed8c66d
23-
BLACKFIRE_SERVER_TOKEN=c777e5620cbb9045b8c8072371f9350ee15930fc5d3c412f540f09ff6b072cea
23+
BLACKFIRE_SERVER_TOKEN=c777e5620cbb9045b8c8072371f9350ee15930fc5d3c412f540f09ff6b072cea

0 commit comments

Comments
 (0)