2017 © Pedro Peláez
 

library start

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

image

tdt/start

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  • Friday, October 11, 2013
  • by coreation
  • Repository
  • 3 Watchers
  • 4 Stars
  • 112 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 5 Forks
  • 2 Open issues
  • 19 Versions
  • 0 % Grown

The README.md

tdt/start

Build Status, (*1)

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router. If you have an empty LAMP stack, this is the right way to go. If you already have a Symfony, Drupal, WordPress, Zend... system installed, you might want to look into the separate packages., (*2)


Installation

Composer

We use composer to install all The Datatank's dependencies. Composer is a PHP package manager and installs necessary dependencies for you, instead of having to download those dependencies yourself. These dependencies are described in the composer.json file along with some additional meta-data. For more information about composer, check out their project website., (*3)

Open a terminal, and install composer:, (*4)

``` bash $ curl -s https://getcomposer.org/installer | php, (*5)

Move composer to a directory in your $PATH (for easy access)

$ sudo mv composer.phar /usr/local/bin/composer, (*6)


### Create-project If you have composer installed, you can get your copy of tdt/start by running: ``` bash $ composer create-project tdt/start -s dev

After that a composer update: composer update is adviced., (*7)

Alternative

Clone this git repository to your machine, you can checkout to a certain tag (version) too. After that use composer to get all dependencies., (*8)

``` bash $ composer update, (*9)



- - - ## Getting started There are two folders in this repository: public/ and app/. Public contains all the publicly accessible files, such as html, javascript and css files. App contains all the bootstrap code which configures and initiates the correct packages. ### index.php Copy the example index.php file from public/index.example.php → public/index.php. Change the environment setting if desired. The default environment setting is production, but if you're looking to develop or test the software you want to change the environment setting to _development_ or _testing_ respectively. ### Configuration Copy the config example files in app/config/ (e.g. app/config/general.example.json → app/config/general.json) Below we cover each of the configuration files and what their configuration parameters are: #### general.json 1. hostname - The hostname of the server it's installed on e.g. http://localhost/ . 2. subdir - The subdirectory of the host where you installed The DataTank. Mostly this is the filestructure relative to your _www_ folder. Don't forget the trailing slash if you're filling this in! 3. timezone - The timezone you're in. 4. defaultlanguage - The abbreviation of your language e.g. en, nl,... 5. defaultformat - The default format in which queried data will be presented in if no format is specified with the request. 6. accesslogapache - The absolute path to the apache log access file. This will be used to perform some statistical queries. 7. cache - Contains three parameters to perform caching: + system - Choose from NoCache or MemCache. If you opt for MemCache, be sure that Memcached is installed. + host - The host that the caching system is running on. Note that if NoCache has been used, host and port don't really matter. + port - The port to which we have to connect in order to communicate with the caching system. 8. logging - Contains parameters to log actions that happen within the software: + enabled - true/false. + path - The absolute path to a directory where we can put the logging files. Make sure PHP has write access to this directory! #### db.json 1. system - The system name of the database. MySQL is strongly advised, although we use an ORM that handles different kinds of databases, we have not tested this thoroughly enough. 2. host - The host on which the database runs. e.g. localhost 3. user - The username to connect to the database. Make sure this user has write privileges. 4. name - The name of the database you want to use to let The DataTank write its meta-data in. 5. password - The password for the user to connect to the database. #### cores.json This file will contain the regular expressions that will route an HTTP-request to the correct destination. Uncomment the routes in the _core_ entry of the json file, and that should get you going. #### auth.json This file will contains your user(s) for the autheticated parts of The DataTank. Username and password are required. These users are used in combination with routes, serveral routes in the example cores file require the user `tdtadmin` for example, but here are some more: #####Example routes ```javascript // Normal route "HTTP_METHOD | URI" : "CONTROLLER" // Single user "HTTP_METHOD | URI | @username" : "CONTROLLER" // Multiple users "HTTP_METHOD | URI | @username, @user2, @user3" : "CONTROLLER"

Virtual host

  • Make the public/ folder the root of a virtual host.

Below are some examples but you can use any webserver you want., (*10)

Nginx

``` Nginx server{ # Listen to a certain ip/port (e.g. IPV4 and IPV6 on port 80) listen [::]:80;, (*11)

# This example runs the datatank on a subdomain
server_name     data.domain.ext;

# Point your root to the correct folder
root            /path/to/tdt/start/public;


# Rewrite for clean URLs
location / {
    rewrite ^/(.*)$ /index.php?$1 last;
}

# Other directives here

}, (*12)



#### Apache Rewrites are done by the included .htaccess file ``` ApacheConf <VirtualHost *:80> # Point your root to the correct folder DocumentRoot /path/to/tdt/start/public # This example runs the datatank on a subdomain ServerName data.domain.ext # Other directives here </VirtualHost>

Updating tdt/start

Updating tdt/start isn't something you can do with composer (for now). However you can still upgrade by pulling the latest version with GIT:, (*13)

``` bash, (*14)

git init git remote add origin https://github.com/tdt/start.git git pull, (*15)

```, (*16)

The Versions

11/10 2013

dev-master

9999999-dev http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

28/08 2013

dev-development

dev-development http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

25/08 2013

dev-feature-tdtext

dev-feature-tdtext http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPL-3.0

The Requires

 

07/08 2013

v1.2.4

1.2.4.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

22/05 2013

v1.2.3

1.2.3.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

30/04 2013

v1.2.2

1.2.2.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

29/04 2013

v1.2.1

1.2.1.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

09/04 2013

v1.2.0

1.2.0.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

19/03 2013

v1.1.9

1.1.9.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

12/03 2013

v1.1.8

1.1.8.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

08/03 2013

v1.1.7

1.1.7.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

08/03 2013

v1.1.6

1.1.6.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

05/03 2013

v1.1.5

1.1.5.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

05/03 2013

v1.1.4

1.1.4.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

04/03 2013

v1.1.3

1.1.3.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

20/02 2013

v1.1.2

1.1.2.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

04/02 2013

v1.1.1

1.1.1.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

23/01 2013

v1.1.0

1.1.0.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires

 

15/01 2013

v1.0.0

1.0.0.0 http://thedatatank.com

If you want to start working on The DataTank, start here! This is an installer, a config reader and a router.

  Sources   Download

AGPLv3

The Requires