GithubHelp home page GithubHelp logo

sminnee / addons.silverstripe.org Goto Github PK

View Code? Open in Web Editor NEW

This project forked from silverstripe/addons.silverstripe.org

0.0 1.0 0.0 1.47 MB

Website hosting SilverStripe Framework extensions

License: BSD 3-Clause "New" or "Revised" License

ApacheConf 0.75% JavaScript 0.59% HTML 20.36% PHP 22.54% CSS 46.60% Scheme 9.16%

addons.silverstripe.org's Introduction

SilverStripe Addons

Build Status

This is the SilverStripe add-ons listing site project. It aggregates SilverStripe packages from Packagist.

Getting started

  1. git clone https://github.com/silverstripe/addons.silverstripe.org.git
  2. cd into the directory
  3. composer install
  4. Install elasticsearch brew install elasticsearch and configure if required
  5. Install redis brew install redis
  6. Start elasticsearch and redis-server
  7. Start a Resque worker by running ./framework/sake dev/resque/run queue=first_build,update
  8. Run all tasks to populate database (see below, first run may take some time to populate)

Dependencies

ElasticSearch

ElasticSearch is used to provide add-on package indexing and searching.

The configuration is already set up in mysite/_config/injector.yml and will use a different index depending on whether the site is on the production server (live) or on UAT or local development environment (test or dev).

  • Install with brew install elasticsearch
  • Start the server with elasticsearch in your terminal

You should run the elastic search reindex task to create the mappings after installation.

Redis

Redis is an in-memory data structure store which is used by the Resque module when processing and updating new modules from Packagist.org.

  • Install with brew install redis
  • Start the redis instance with redis-server

Once running you can run the UpdateAddonsTask to pull all SilverStripe modules from Packagist into the addons site.

Resque

A PHP implementation of resque is used to provide background building of add-ons details. As such an installation of redis must be present. If you wish to use a remote server, you can configure the ResqueService constructor parameters to specify the backend using the injector in mysite/_config/injector.yml.

To run the background tasks you need to spawn worker processes. On a production server this should be set up using a process monitor such as god. A new worker process can be spawned using the following command in the webroot:

./framework/sake dev/resque/run queue=first_build,update

Tasks

Run each of the following tasks in order the first time you set up the site to ensure you have a full database of modules to work with.

  1. framework/sake dev/tasks/UpdateSilverStripeVersionsTask: Updates the available SilverStripe versions.
  2. framework/sake dev/tasks/UpdateAddonsTask: Runs the add-on updater.
  3. framework/sake dev/tasks/DeleteRedundantAddonsTask: Deletes addons which haven't been updated from packagist in a specified amount of time, which implies they're no longer available there.
  4. framework/sake dev/tasks/BuildAddonsTask: Manually build addons, downloading screenshots and a README for display through the website. There's no need to set up a cron job for this task if you're using the resque queue.
  5. framework/sake dev/tasks/SilverStripe-Elastica-ReindexTask: Defines and refreshes the elastic search index.
  6. framework/sake dev/tasks/CacheHelpfulRobotDataTask: Caches Helpful Robot scores and data, so they can be displayed on listing and detail pages, for each addon. This also removes modules that cannot be loaded by requests to their repository URLs.

Front-end build tooling

The site uses LESS for compiling CSS.

One way to compile it is through Grunt, which requires you to install NodeJS first.

npm install -g grunt grunt-cli
npm install --save-dev

To compile, run:

grunt less

To watch for file changes, run:

grunt watch

addons.silverstripe.org's People

Contributors

ajshort avatar assertchris avatar camfindlay avatar chillu avatar dhensby avatar kmayo-ss avatar mandrew avatar micmania1 avatar robbieaverill avatar sachajudd avatar spiritlevel avatar ss23 avatar vikas-srivastava avatar

Watchers

 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.