We intend to write an article that technically outlines the way Whole Foods Market employs Symfony2 to create a scalable, available and maintainable codebase for our API. The intention is to not endorse any specific vendor, but to outline specific architectural choices we made from an application and infrastructure perspective. Since this is a technical article, we will need to support the ideas under discussion by providing code samples. Code we release will not divulge any trade secrets or compromise the security of our application in any way. All technical teams will be presented this article, in its entirety, and have the opportunity to modify, review and comment on it prior to publishing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic VCL configuration file for varnish. See the vcl(7) | |
# man page for details on VCL syntax and semantics. | |
# | |
# Default backend definition. Set this to point to your content | |
# server. | |
# | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8000"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic VCL configuration file for varnish. See the vcl(7) | |
# man page for details on VCL syntax and semantics. | |
# | |
# Default backend definition. Set this to point to your content | |
# server. | |
# | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8000"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts : platform-qa-server | |
su : yes | |
vars : | |
hipchat_rooms: | |
- { token: "a2a1d9143d45feac80d33bf5246247", room: "504774", name: "LIN Digital Engineering" } | |
pre_tasks: | |
- name : HipChat - Attempting Deploy... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.hostname = "aca.vm" | |
config.vm.box = "https://s3-us-west-2.amazonaws.com/vagrantvmboxes/aca-generic-lamp-packaged.box" | |
config.vm.network "private_network", ip: "10.10.10.60" | |
config.vm.synced_folder "~/Desktop/htdocs", "/var/www" | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.hostname = "aca.vm" | |
config.vm.box = "https://s3-us-west-2.amazonaws.com/vagrantvmboxes/aca-generic-lamp-packaged.box" | |
config.vm.network "private_network", ip: "10.10.10.60" | |
config.vm.synced_folder "c:\\htdocs", "/var/www" | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get access token via OAuth2 three legged dance | |
* @see https://sagedocs.wholelabs.com/wiki/index.php?title=Sage-api/v2/authorize | |
* @throws Exception | |
* @return string | |
* @todo: Doc #experiment | |
*/ | |
protected function getAccessToken() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\Debug\Debug; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\ClassLoader\ApcClassLoader; | |
$loader = require(__DIR__ . '/../app/bootstrap.php.cache'); | |
require(__DIR__ . '/../app/AppKernel.php'); | |
require(__DIR__ . '/../app/AppCache.php'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"formatVersion": 1, | |
"passTypeIdentifier": "pass.com.accenture.wfm.affinity", | |
"serialNumber": "p69f2J", | |
"teamIdentifier": "YJ9R4XZ4CL", | |
"webServiceURL": "https://example.com/passes/", | |
"authenticationToken": "vxwxd7J8AlNNFPS8k0a0FfUFtq0ewzFdc", | |
"locations": [ | |
{ | |
"longitude": -122.3748889, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DirectoryIndex app_dev.php | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ | |
RewriteRule ^(.*) - [E=BASE:%1] |
OlderNewer