Browse Source

Install fuel core and packages using composer

NOTE: This also upgrades our version of fuel from 1.5 to1.7
Hamilton Turner 10 years ago
parent
commit
86e38bb400

+ 0 - 5
frameworks/PHP/lithium/setup.sh

@@ -1,17 +1,12 @@
 #!/bin/bash
 #!/bin/bash
 
 
 export PHP_HOME=${IROOT}/php-5.5.17
 export PHP_HOME=${IROOT}/php-5.5.17
-
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
 export PHP_FPM=$PHP_HOME/sbin/php-fpm
-
 export NGINX_HOME=${IROOT}/nginx
 export NGINX_HOME=${IROOT}/nginx
 
 
-
 sed -i 's|192.168.100.102|'"${DBHOST}"'|g' app/config/bootstrap/connections.php
 sed -i 's|192.168.100.102|'"${DBHOST}"'|g' app/config/bootstrap/connections.php
 sed -i 's|root .*/FrameworkBenchmarks/php-lithium|root '"${TROOT}"'|g' deploy/nginx.conf
 sed -i 's|root .*/FrameworkBenchmarks/php-lithium|root '"${TROOT}"'|g' deploy/nginx.conf
 sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
 sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
 
 
-export PATH="$PHP_HOME/bin:$PHP_HOME/sbin:$PATH"
-
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
 $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf
 $NGINX_HOME/sbin/nginx -c $TROOT/deploy/nginx.conf

+ 6 - 0
frameworks/PHP/php-fuel/.gitignore

@@ -7,3 +7,9 @@
 .DS_Store
 .DS_Store
 /tags
 /tags
 .idea
 .idea
+docs
+vendor
+fuel/core
+fuel/vendor
+fuel/packages
+deploy/php-fpm.pid

+ 146 - 0
frameworks/PHP/php-fuel/composer.json

@@ -0,0 +1,146 @@
+{
+  "repositories": [
+      {
+          "type": "package",
+          "package": {
+              "name": "fuel/auth",
+              "type": "fuel-package",
+              "version": "1.7.2",
+              "dist": {
+                  "url": "https://github.com/fuel/auth/archive/1.7/master.zip",
+                  "type": "zip"
+              },
+              "source": {
+                  "url": "https://github.com/fuel/auth.git",
+                  "type": "git",
+                  "reference": "1.8/develop"
+              }
+          }
+      },
+      {
+          "type": "package",
+          "package": {
+              "name": "fuel/email",
+              "type": "fuel-package",
+              "version": "1.7.2",
+              "dist": {
+                  "url": "https://github.com/fuel/email/archive/1.7/master.zip",
+                  "type": "zip"
+              },
+              "source": {
+                  "url": "https://github.com/fuel/email.git",
+                  "type": "git",
+                  "reference": "1.8/develop"
+              }
+          }
+      },
+      {
+          "type": "package",
+          "package": {
+              "name": "fuel/oil",
+              "type": "fuel-package",
+              "version": "1.7.2",
+              "dist": {
+                  "url": "https://github.com/fuel/oil/archive/1.7/master.zip",
+                  "type": "zip"
+              },
+              "source": {
+                  "url": "https://github.com/fuel/oil.git",
+                  "type": "git",
+                  "reference": "1.8/develop"
+              }
+          }
+      },
+      {
+          "type": "package",
+          "package": {
+              "name": "fuel/orm",
+              "type": "fuel-package",
+              "version": "1.7.2",
+              "dist": {
+                  "url": "https://github.com/fuel/orm/archive/1.7/master.zip",
+                  "type": "zip"
+              },
+              "source": {
+                  "url": "https://github.com/fuel/orm.git",
+                  "type": "git",
+                  "reference": "1.8/develop"
+              }
+          }
+      },
+      {
+          "type": "package",
+          "package": {
+              "name": "fuel/parser",
+              "type": "fuel-package",
+              "version": "1.7.2",
+              "dist": {
+                  "url": "https://github.com/fuel/parser/archive/1.7/master.zip",
+                  "type": "zip"
+              },
+              "source": {
+                  "url": "https://github.com/fuel/parser.git",
+                  "type": "git",
+                  "reference": "1.8/develop"
+              }
+          }
+      },
+      {
+          "type": "package",
+          "package": {
+              "name": "fuel/core",
+              "type": "fuel-package",
+              "version": "1.7.2",
+              "dist": {
+                  "url": "https://github.com/fuel/core/archive/1.7/master.zip",
+                  "type": "zip"
+              },
+              "source": {
+                  "url": "https://github.com/fuel/core.git",
+                  "type": "git",
+                  "reference": "1.8/develop"
+              }
+          }
+      },
+      {
+          "type": "package",
+          "package": {
+              "name": "fuel/docs",
+              "type": "fuel-package",
+              "version": "1.7.2",
+              "dist": {
+                  "url": "https://github.com/fuel/docs/archive/1.7/master.zip",
+                  "type": "zip"
+              },
+              "source": {
+                  "url": "https://github.com/fuel/docs.git",
+                  "type": "git",
+                  "reference": "1.8/develop"
+              }
+          }
+      }
+  ],
+  "_README_": [
+    "If you want to download everything",
+    "documentation,examples,etc, then require fuel/fuel",
+    "instead of just fuel/core",
+    "WARN: fuel/log"
+  ]
+  ,
+  "require": {
+    "composer/installers": "~1.0",
+    "fuel/core": "1.7.2",
+    "fuel/auth": "1.7.2",
+    "fuel/parser": "1.7.2",
+    "fuel/oil": "1.7.2",
+    "fuel/orm": "1.7.2"
+  },
+  "config": {
+    "vendor-dir": "fuel/vendor"
+  },
+  "extra": {
+      "installer-paths": {
+          "fuel/{$name}": ["fuel/core"]
+      }
+  }
+}

+ 10 - 1
frameworks/PHP/php-fuel/install.sh

@@ -1,3 +1,12 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends php nginx
+export PHP_HOME=${IROOT}/php-5.5.17
+export PHP_FPM=$PHP_HOME/sbin/php-fpm
+export NGINX_HOME=${IROOT}/nginx
+
+
+fw_depends php nginx composer
+
+${PHP_HOME}/bin/php $IROOT/composer.phar install \
+  --no-interaction --working-dir $TROOT \
+  --no-progress --optimize-autoloader