GithubHelp home page GithubHelp logo

web5design / odi-website-drupal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theodi/odi-website-drupal

0.0 3.0 0.0 78.58 MB

Drupal install for theodi.org

License: GNU General Public License v2.0

odi-website-drupal's Introduction

ODI Corporate Website

This is the ODI's corporate Drupal website. We're currently working towards getting a sane development path for this, and we currently have a reliable copy of the code in version control. Coming soon are:

  • Getting assets into a CDN (so no more images in Git repos)
  • Cucumber tests for new features
  • Continuous deployment(?)

Styling

The CSS is managed using LESS. This requires node.js and lessc to be installed on the box like so:

    # Installs Node

    sudo apt-get install python-software-properties python g++ make
    sudo add-apt-repository ppa:chris-lea/node.js
    sudo apt-get update
    sudo apt-get install nodejs npm

    # Installs lessc

    sudo npm install -g less

To compile to the css directory, run lessc from the styling directory like so:

    lessc odi.less > /var/www/theodi.org/sites/all/themes/odi/css/odi.css

Running the website locally

Using the power of Drush, we can now run the Drupal website on a development server with a simple terminal command in a Rails-esque stylee, and no messing around with Apache. Yay! There's a couple of steps to do this reliably:

  • First of all, install Drush. You can do this easily on a Mac (with Homebrew installed) by simply running brew install drush, you can also use apt-get on Ubuntu, by running sudo apt-get install drush
  • On a Mac (not sure if this is the case on Ubuntu), you'll also need the CGI version of PHP, which you can get from here. Next copy the the PHP5 file to somewhere on your computer and symlink it into somewhere in your PATH like so ln -s /Path/To/PHP5/bin/php-cgi /usr/local/bin/php-cgi
  • In your PHP5 directory, open the lib/php.ini directory and add the line extension = memcache.so
  • Next, install and run MySQL, and set up a database for Drupal to run on
  • Next step is to get a working copy of the database. Hop onto the live server, navigate to the root www directory and type drush sql-dump > ../backups/yyyy-mm-dd-backup.sql (obviously replacing yyyy-mm-dd with the date), then download the file using SCP or FTP.
  • Also download a copy of the sites/default/settings.php file
  • Copy your dowloaded settings.php file into the sites/default folder of this repo (MAKE SURE YOU DON'T COMMIT THIS TO GIT), and change the $base_url variable to http://localhost:8080 and the $database variables to match the settings on your local machine. Also comment out the last two lines. I haven't yet worked out how to get Memcached running, but it shouldn't matter in dev.
  • Next, copy your database dump into your root working directory on your local machine, and type drush sqlc < {filename of database dump}
  • Now, all there is to do is run drush rs 8080 (or whatever port you want the server to run on), and navigate to http://localhost:8080 in your browser. You should see the Drupal website in all its glory!

odi-website-drupal's People

Contributors

pezholio avatar floppy avatar davetaz avatar

Watchers

JT5D avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.