Git Product home page Git Product logo

algoreaplatform's Introduction

AlgoreaPlatform

Documentation

A [https://docs.google.com/document/d/1_veke2ezLHNhiUjZpFvA572n18qol3WldLz5F-mnqiI/edit#heading=h.s0aj64ixvarm) of the architecture of this platform is available.

Dependencies

The Algorea Platform depends on:

  • php
  • mysql
  • zip
  • composer
  • bower

Installation

This repository contains the source code for the Algorea Platform.

To set up:

git clone [repository url]
cd AlgoreaPlatform
git submodule update --init
bower install
composer install
cp -p config_local_template.php config_local.php

then fill config_local.php with your configuration, including database and item IDs (you can choose them arbitrarily).

To install the database, check the last version in the schema folder, and from it, execute full_schema.sql and then each revision in order or use commonFramework/schema-migrate.php script. (Check schema/README.md for more information.)

You must then run

php commonFramework/modelsManager/triggers.php

Finally, run

php shared/initPlatform.php

this will make a boilerplate for a platform. You can use this script again if you want to set up another platform on the same database, with different item IDs.

To add users as administrators on this platform, they must first log into the platform (to have their user created within the platform), then check the shared/addAdmin.php script to add them as users. You'll need to modify the configuration at the beginning of the file.

Configuration

Authentication keys

The platform needs a key pair to sign its tokens.

To generate a private key, use :

openssl genpkey -algorithm RSA -out private_key.pem

On Mac and some older versions of OpenSSL, you might need to use instead :

openssl genrsa -out private_key.pem

Then extract the public key :

openssl rsa -pubout -in private_key.pem -out public_key.pem

Finally, set $config->platform->private_key to the contents of private_key.pem, and $config->platform->public_key to the contents of public_key.pem.

Webserver configuration

Example webserver configurations.

On Apache2

<VirtualHost *:80>
    [your other config]

    DocumentRoot /path/to/algorea/

    # Redirect all requests to index.php, except for existing files
    RewriteEngine on
    RewriteCond /path/to/algorea/%{REQUEST_FILENAME} !-d
    RewriteCond /path/to/algorea/%{REQUEST_FILENAME} !-f
    RewriteRule . /index.php [L,QSA]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</VirtualHost>

On Nginx

server {
  [your other config]

  root /path/to/algorea;

  location / {
    try_files $uri /index.php;
    include /etc/nginx/mime.types;
  }
  location ~* \.php {
     try_files $uri =404;
     fastcgi_pass unix:/var/run/php5-fpm.sock;
     include fastcgi.conf;
     include fastcgi_params;
     fastcgi_read_timeout 120;
     fastcgi_cache off;
     fastcgi_buffer_size 256k;
     fastcgi_buffers 4 256k;
     fastcgi_busy_buffers_size 256k;
     fastcgi_param HTTP_AUTHORIZATION $http_authorization;
  }
}

algoreaplatform's People

Contributors

eroux avatar gregorjerse avatar hsermeno avatar mathias-hiron avatar mblockelet avatar mobydimk avatar smadbe avatar zgtm 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.