Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Mar 23, 2015
1 parent 73cd81f commit d6c9bc6
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
63 changes: 63 additions & 0 deletions Dockerrun.aws.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "php-app",
"host": {
"sourcePath": "/var/app/current/php-app"
}
},
{
"name": "nginx-proxy-conf",
"host": {
"sourcePath": "/var/app/current/proxy/conf.d"
}
}
],
"containerDefinitions": [
{
"name": "php-app",
"image": "php:fpm",
"essential": true,
"memory": 128,
"mountPoints": [
{
"sourceVolume": "php-app",
"containerPath": "/var/www/html",
"readOnly": true
}
]
},
{
"name": "nginx-proxy",
"image": "nginx",
"essential": true,
"memory": 128,
"portMappings": [
{
"hostPort": 80,
"containerPort": 80
}
],
"links": [
"php-app"
],
"mountPoints": [
{
"sourceVolume": "php-app",
"containerPath": "/var/www/html",
"readOnly": true
},
{
"sourceVolume": "awseb-logs-nginx-proxy",
"containerPath": "/var/log/nginx"
},
{
"sourceVolume": "nginx-proxy-conf",
"containerPath": "/etc/nginx/conf.d",
"readOnly": true
}
]
}
]
}
3 changes: 3 additions & 0 deletions php-app/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h1>Hello World!!!</h1>
<h3>PHP Version <?= phpversion() ?></h3>
<a href="/static.html">Static HTML Page</a>
2 changes: 2 additions & 0 deletions php-app/static.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>This is a static HTML page</h1>
<a href="/">Go Back</a>
22 changes: 22 additions & 0 deletions proxy/conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
server {
listen 80;
server_name localhost;
root /var/www/html;

index index.php;

location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}

include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;

fastcgi_pass php-app:9000;
fastcgi_index index.php;
}
}

0 comments on commit d6c9bc6

Please sign in to comment.