Skip to content

Commit

Permalink
Merge pull request #324 from PROCERGS/dev
Browse files Browse the repository at this point in the history
PROCERGS-compatible status page #313
  • Loading branch information
guilhermednt committed Dec 19, 2015
2 parents f15d68c + 5c50090 commit 78c644c
Show file tree
Hide file tree
Showing 7 changed files with 273 additions and 50 deletions.
2 changes: 2 additions & 0 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public function registerBundles()

new Nelmio\CorsBundle\NelmioCorsBundle(),
new Nelmio\SecurityBundle\NelmioSecurityBundle(),
new Liip\MonitorBundle\LiipMonitorBundle(),
new PROCERGS\LoginCidadao\MonitorBundle\PROCERGSLoginCidadaoMonitorBundle(),
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
Expand Down
23 changes: 23 additions & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,26 @@ nelmio_security:
xss_protection:
enabled: false
mode_block: false

liip_monitor:
enable_controller: true
checks:
memcache:
main:
host: %memcached_host%
port: %memcached_port%

security_advisory:
lock_file: '%kernel.root_dir%/../composer.lock'

doctrine_dbal: default

readable_directory:
- '%kernel.cache_dir%'
- '%user_profile_upload_dir%'
- '%client_image_upload_dir%'

writable_directory:
- '%kernel.cache_dir%'
- '%user_profile_upload_dir%'
- '%client_image_upload_dir%'
2 changes: 2 additions & 0 deletions app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ parameters:
trusted_proxies: ~
# IPs allowed to access dev environment
dev_allowed: [ 127.0.0.0/8 ]
# IPs allowed to access monitoring endpoint
allowed_monitors: [ 127.0.0.0/8 ]

memcached_host: 127.0.0.1
memcached_port: 11211
Expand Down
10 changes: 10 additions & 0 deletions app/config/routing.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Monitor
_monitor:
resource: "@LiipMonitorBundle/Resources/config/routing.xml"
prefix: /monitor/health

procergs_monitoring:
resource: "@PROCERGSLoginCidadaoMonitorBundle/Controller/"
type: annotation
prefix: /

#Nelmio Security
nelmio_security:
path: /nelmio/csp/report
Expand Down
3 changes: 3 additions & 0 deletions app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ security:
- { path: ^/connect/google$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/login/facebook$, role: IS_AUTHENTICATED_ANONYMOUSLY }

- { path: ^/monitor/health, role: IS_AUTHENTICATED_ANONYMOUSLY, ip: %allowed_monitors% }
- { path: ^/public/status, role: IS_AUTHENTICATED_ANONYMOUSLY, ip: %allowed_monitors% }

- { path: ^/contact$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/general$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/privacy$, role: IS_AUTHENTICATED_ANONYMOUSLY }
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"require" : {
"php" : ">=5.4.16",
"symfony/symfony" : "2.7.*",
"doctrine/orm" : "~2.2,>=2.2.3,<2.5",
"doctrine/orm" : "~2.4",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle" : "~1.4",
"doctrine/doctrine-bundle" : "~1.5",
"symfony/assetic-bundle" : "~2.3",
"symfony/swiftmailer-bundle" : "~2.3",
"symfony/monolog-bundle" : "~2.4",
Expand Down Expand Up @@ -54,7 +54,9 @@
"league/uri": "^4.0",
"oro/doctrine-extensions": "^1.0",
"nelmio/cors-bundle": "^1.4",
"nelmio/security-bundle": "^1.8"
"nelmio/security-bundle": "^1.8",
"liip/monitor-bundle": "^2.2",
"procergs/meurs-monitor-bundle": "^1.0"
},
"require-dev": {
"sensio/generator-bundle" : "~2.3"
Expand Down
Loading

0 comments on commit 78c644c

Please sign in to comment.