From d51264c55ba73330cf129b43f635c9489fe663f9 Mon Sep 17 00:00:00 2001 From: Template builder Date: Thu, 19 May 2016 18:18:45 -0400 Subject: Creating template --- .openshift/action_hooks/deploy | 8 ++++ .openshift/markers/.gitkeep | 0 config/nginx.d/default.conf.erb | 40 +++++++++++++++++++ config/nginx.d/export_env.erb | 5 +++ config/php.d/.gitkeep | 0 config/php.d/extensions.ini | 45 ++++++++++++++++++++++ www/index.php | 83 ++++++++++++++++++++++++++++++++++++++++ www/static/openshift-logo.png | Bin 0 -> 9714 bytes 8 files changed, 181 insertions(+) create mode 100755 .openshift/action_hooks/deploy create mode 100644 .openshift/markers/.gitkeep create mode 100644 config/nginx.d/default.conf.erb create mode 100644 config/nginx.d/export_env.erb create mode 100644 config/php.d/.gitkeep create mode 100644 config/php.d/extensions.ini create mode 100644 www/index.php create mode 100644 www/static/openshift-logo.png diff --git a/.openshift/action_hooks/deploy b/.openshift/action_hooks/deploy new file mode 100755 index 0000000..95cdeef --- /dev/null +++ b/.openshift/action_hooks/deploy @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "Deploying..." +build_config + +# Uncomment the following line to use Composer and automatically install dependencies on deploy. +# +#cd $OPENSHIFT_REPO_DIR; composer install diff --git a/.openshift/markers/.gitkeep b/.openshift/markers/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/nginx.d/default.conf.erb b/config/nginx.d/default.conf.erb new file mode 100644 index 0000000..d82da13 --- /dev/null +++ b/config/nginx.d/default.conf.erb @@ -0,0 +1,40 @@ +server { + root <%= ENV['OPENSHIFT_REPO_DIR'] %>/www; + listen <%= ENV['OPENSHIFT_PHP_IP'] %>:<%= ENV['OPENSHIFT_PHP_PORT'] %>; + server_name <%= ENV['OPENSHIFT_APP_DNS'] %>; + index index.php index.html index.htm <%= ENV['NGINX_EXTRA_INDEX'] %>; + + set_real_ip_from <%= ENV['OPENSHIFT_PHP_IP'] %>; + real_ip_header X-Forwarded-For; + + # avoid caching by proxies + add_header Cache-Control private; + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass unix:<%= ENV['OPENSHIFT_PHP_DIR'] %>/run/php-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + include openshift_params; + + # uncomment to export all environment variables to fastcgi + #include <%= ENV['OPENSHIFT_REPO_DIR'] %>/config/nginx.d/export_env; + } + + # avoid unnecessary log + location = /favicon.ico { + access_log off; + log_not_found off; + } + + location = /robots.txt { + access_log off; + log_not_found off; + } + + # Handle any other URI + location / { + try_files $uri $uri/ =404; + } +} diff --git a/config/nginx.d/export_env.erb b/config/nginx.d/export_env.erb new file mode 100644 index 0000000..4e5db9a --- /dev/null +++ b/config/nginx.d/export_env.erb @@ -0,0 +1,5 @@ +<% +ENV.each do |name, value| + puts "fastcgi_param #{name} '#{value}';" unless name.start_with?("OPENSHIFT_"); +end +%> \ No newline at end of file diff --git a/config/php.d/.gitkeep b/config/php.d/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config/php.d/extensions.ini b/config/php.d/extensions.ini new file mode 100644 index 0000000..0379fe6 --- /dev/null +++ b/config/php.d/extensions.ini @@ -0,0 +1,45 @@ +extension=apcu.so +extension=bcmath.so +extension=bz2.so +extension=calendar.so +extension=ctype.so +extension=curl.so +extension=dom.so +extension=exif.so +extension=fileinfo.so +extension=ftp.so +extension=gd.so +extension=gettext.so +extension=gmp.so +extension=iconv.so +extension=imagick.so +extension=imap.so +extension=intl.so +extension=json.so +extension=mbstring.so +extension=mcrypt.so +extension=mysqli.so +extension=pdo.so +extension=pdo_mysql.so +extension=pdo_pgsql.so +extension=pdo_sqlite.so +extension=pgsql.so +extension=phar.so +extension=posix.so +extension=shmop.so +extension=simplexml.so +extension=soap.so +extension=sockets.so +extension=sqlite3.so +extension=sysvmsg.so +extension=sysvsem.so +extension=sysvshm.so +extension=tidy.so +extension=tokenizer.so +extension=xmlreader.so +extension=xml.so +extension=xmlwriter.so +extension=xsl.so +extension=wddx.so +extension=zip.so +#extension=mongodb.so diff --git a/www/index.php b/www/index.php new file mode 100644 index 0000000..74b121d --- /dev/null +++ b/www/index.php @@ -0,0 +1,83 @@ + + + + + Welcome to OpenShift + + + + +
+
+
+ OpenShift Logo +
+

Welcome!

+

You are running PHP

+
+
+

What's next?

+

Make changes to this website by editing the files inside www/ of your repository.

+

Commit your changes after, then push to the remote repository.

+
$ git commit -a -m "Some commit message"
+$ git push origin master
+

More

+ +
+
+ + \ No newline at end of file diff --git a/www/static/openshift-logo.png b/www/static/openshift-logo.png new file mode 100644 index 0000000..e83e59b Binary files /dev/null and b/www/static/openshift-logo.png differ -- cgit v1.2.3