Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initisl Attempt at converting the Drupal ClickStack to Work for Symfo…

…ny instead.
  • Loading branch information...
commit eceae8a4b4e950562493f2c99dc986611b1607ae 1 parent 12ebf06
Tom Burton authored
3  .gitignore
View
@@ -4,4 +4,5 @@
/tmp
/php
/drupal-plugin.zip
-.DS_Store
+.DS_Store
+.idea/
7 Makefile
View
@@ -1,14 +1,9 @@
-plugin_name = drupal-plugin
+plugin_name = symfony-plugin
publish_bucket = cloudbees-clickstack
publish_repo = testing
publish_url = s3://$(publish_bucket)/$(publish_repo)/
-# Version
-lib/drush.zip = drush-5.8.zip
-
-deps = lib php lib/drush.zip
-
pkg_files = README.md LICENSE setup functions lib php/lib conf \
php/php-setup php/conf php/control php/php-functions
6 conf/drush.ini
View
@@ -1,6 +0,0 @@
-; Override a few security settings while Drush gets installed.
-memory_limit = 128M
-error_reporting = E_ALL | E_NOTICE | E_STRICT
-display_errors = stderr
-safe_mode = Off
-sendmail_path = /dev/null
93 conf/symfony-php.ini
View
@@ -0,0 +1,93 @@
+; Stack inserts
+max_post = "{{max_post}}"
+log_dir = "{{log_dir}}"
+app_dir = "{{app_dir}}"
+
+; Base configuration
+short_open_tag = Off
+date.timezone = UTC
+
+; Resource limitations
+output_buffering = 4096
+max_execution_time = 30
+max_input_time = 60
+memory_limit = 128M
+post_max_size = "${max_post}"
+upload_max_filesize = "${max_post}"
+
+; Security
+disable_functions = php_uname, getmyuid, getmypid, passthru, leak, listen,
+ diskfreespace, tmpfile, link, ignore_user_abord, shell_exec,
+ dl, set_time_limit, system, exec, highlight_file, source,
+ show_source, fpaththru, virtual, posix_ctermid,
+ posix_getcwd, posix_getegid, posix_geteuid, posix_getgid,
+ posix_getgrgid, posix_getgrnam, posix_getgroups,
+ posix_getlogin, posix_getpgid, posix_getpgrp, posix_getpid,
+ posix, _getppid, posix_getpwnam, posix_getpwuid,
+ posix_getrlimit, posix_getsid, posix_getuid, posix_isatty,
+ posix_kill, posix_mkfifo, posix_setegid, posix_seteuid,
+ posix_setgid, posix_setpgid, posix_setsid, posix_setuid,
+ posix_times, posix_ttyname, posix_uname, proc_open,
+ proc_close, proc_get_status, proc_nice, proc_terminate,
+ phpinfo
+
+register_globals = Off
+allow_url_fopen = Off
+allow_url_include = Off
+session.cookie_httponly = 1
+expose_php = Off
+
+; Errors and logging
+display_erorrs = Off
+log_errors = On
+error_log = "${log_dir}/php/error.log"
+
+; Directories
+default_basedir = "${app_dir}/app/:${app_dir}/tmp/:${app_dir}/var/:${log_dir}/"
+open_basedir = "${default_basedir}"
+soap.wsdl_cache_dir="${app_dir}/tmp"
+session.save_path = "${app_dir}/var/php"
+include_path = "$app_dir/lib/php/lib/php"
+
+; Uploads
+upload_tmp_dir = "${app_dir}/tmp"
+
+; Additions
+extension_dir = "${app_dir}/lib/php/modules"
+extension = uploadprogress.so
+
+; Stack inserts go here
+
+; Additional Extensions for Symfony & my initial Symfony Application
+extension=php_curl.so
+extension=php_fileinfo.so
+extension=php_gmp.so
+extension=php_intl.so
+extension=php_mbstring.so
+extension=php_openssl.so
+extension=php_pdo_mysql.so
+;extension=php_pdo_oci.so
+;extension=php_pdo_odbc.so
+;extension=php_pdo_pgsql.so
+extension=php_pdo_sqlite.so
+
+extension=php_soap.dll
+
+;TODO: can I move this to SymfonyResume and append it here on app deploy?
+;SOAP - required for PHP LiveDocX used by my Resume Template Site.
+[soap]
+; Enables or disables WSDL caching feature.
+; http://php.net/soap.wsdl-cache-enabled
+soap.wsdl_cache_enabled=1
+
+; Sets the directory name where SOAP extension will put cache files.
+; http://php.net/soap.wsdl-cache-dir
+soap.wsdl_cache_dir="/tmp"
+
+; (time to live) Sets the number of second while cached file will be used
+; instead of original one.
+; http://php.net/soap.wsdl-cache-ttl
+soap.wsdl_cache_ttl=86400
+
+; Sets the size of the cache limit. (Max. number of WSDL files to cache)
+soap.wsdl_cache_limit = 5
0  conf/drupal.head.conf → conf/symfony.head.conf
View
File renamed without changes
20 conf/drupal.site.conf → conf/symfony.site.conf
View
@@ -128,4 +128,22 @@ DirectoryIndex index.php index.html index.htm
Header append Vary Accept-Encoding
</FilesMatch>
</IfModule>
-</IfModule>
+</IfModule>
+
+<VirtualHost *:80>
+ ServerName ${applicationName}.${account}.cloudbees.net
+ ServerAlias ${applicationName}.${account}.cloudbees.net
+ #ServerName domain.tld
+ #ServerAlias www.domain.tld
+
+ DocumentRoot ${app_dir}/web
+ <Directory ${app_dir}/web>
+ # enable the .htaccess rewrites
+ AllowOverride All
+ Order allow,deny
+ Allow from All
+ </Directory>
+
+ ErrorLog /var/log/apache2/project_error.log
+ CustomLog /var/log/apache2/project_access.log combined
+</VirtualHost>
77 functions
View
@@ -2,17 +2,19 @@
. "$genapp_functions/core"
-config_drush() {
- echo "Configuring Drush"
- mkdir -m 700 "$app_dir/.drushini"
- install -m 600 "$plugin_dir/conf/drush.ini" "$app_dir/.drushini/php.ini"
- sed -i "2iapp_dir = $app_dir" "$app_dir/.drushini/php.ini"
-}
-
-install_drupal() {
+#config_symfony()
+#{
+# echo "Configuring Symfony"
+# mkdir -m 700 "$app_dir/.drushini"
+# install -m 600 "$plugin_dir/conf/drush.ini" "$app_dir/.drushini/php.ini"
+# sed -i "2iapp_dir = $app_dir" "$app_dir/.drushini/php.ini"
+#}
+
+install_symfony()
+{
if [ -e "$app_dir/plugins/newrelic" ]; then
echo "Writing framework to NewRelic configuration"
- echo "newrelic.framework = drupal" >> "$app_dir/conf/php.ini"
+ echo "newrelic.framework = symfony" >> "$app_dir/conf/php.ini"
fi
echo "Writing httpd config"
@@ -20,42 +22,27 @@ install_drupal() {
> "$app_dir/conf/httpd.head.conf"
paste "$plugin_dir/conf/drupal.site.conf" "$app_dir/conf/httpd.site.conf" \
> "$app_dir/conf/httpd.site.conf"
+ paste "$plugin_dir/conf/symfony-php.ini" "$app_dir/conf/php.ini" \
+ > "$app_dir/conf/php.ini"
- echo "Setting up drupal"
- set +e
- . "$control_dir/config"
- set -e
- export PHPRC="$app_dir/.drushini"
-
- _curdir="$PWD"
- cd "$app_dir/app"
- echo "Checking if Drupal is already installed"
- _name=$(metadata drupal_name Drupal@CloudBees)
- _username=$(metadata drupal_user admin)
- _password=$(metadata drupal_pass password)
- _mail=$(metadata drupal_mail admin@example.com)
- _profile=$(metadata drupal_profile standard)
- _sql_result=$(drush sql-query "SHOW TABLES")
-
- if [ "$_sql_result" == "" ]; then
- echo "Installing Drupal"
- drush --yes site-install "${_profile}" --account-mail="${_mail}" \
- --account-name="${_username}" --account-pass="${_password}" \
- --site-name="${_name}" --site-mail="${_mail}"
- fi
-
- echo "Rewriting permissions post-install"
- chmod -R g-w,o-rwx "$app_dir/app"
-
- for _dir in \
- modules themes sites/default/modules sites/default/themes sites/default/files
- do
- if [ -e "$_dir" ]; then
- chmod -R g+w "$_dir"
- fi
- done
- cd "$_curdir"
+ echo "Setting up symfony"
+
+ cd "$app_dir"
+
+ echo "Rewriting permissions post-install"
+ chmod -R g-w,o-rwx "$app_dir/app"
- echo "Cleaning up post-install"
- rm -rf "$app_dir/.drushini"
+ #TODO: verify the loop will change the necessary perms.
+
+ #for _dir in \
+ #Symfony Symfony/app Symfony/app/cache Symfony/app/cache/prod Symfony/app/cache/dev Symfony/app/logs Symfony/src/* Symfony/web/*
+ #do
+ # if [ -e "$_dir" ]; then
+ # chmod -R g+w "$_dir"
+ # fi
+ #done
+
+ chmod g+w `find . -type d`
+
+ cd "$_curdir"
}
7 setup
View
@@ -9,7 +9,6 @@ set -e
# Installs everything from the PHP stack
. "$plugin_dir/php-setup"
-# Installs drupal-specific content
-install_lib "drush"
-config_drush
-install_drupal
+# Installs symfony-specific content
+#config_symfony
+install_symfony
Please sign in to comment.
Something went wrong with that request. Please try again.