Skip to content
This repository was archived by the owner on Aug 20, 2026. It is now read-only.

Development Setup

Armand Duijn edited this page Sep 1, 2016 · 8 revisions

There are various setups which you can use for local development of gewisweb. Which method you choose will depend on your personal preference and current setup. For instance if you already have a local webserver you may prefer to use a local setup rather than vagrant or docker. It is recommended to read this page carefully and the choose the method which suits you best.

Method #1 Docker

  • Install docker and docker-compose
  • Run docker-compose up -d
  • Run ./dockerexec composer install
  • Run ./dockerexec ./web orm:schema-tool:create

If you need testdata run the following commands

./dockerexec ./web testdata user
./dockerexec ./web testdata activity
./dockerexec ./web testdata decision
./dockerexec ./web testdata education
./dockerexec ./web testdata page
./dockerexec ./web testdata photo
./dockerexec ./web testdata poll

Method #2 Vagrant

  • Install VirtualBox and Vagrant
  • Run vagrant up
  • You now have a fully functional website at http://192.168.41.42/ or http://webdev.gew.is/ Testdata is included automatically and a PhpMyAdmin install can be found at /pma

Method #3 Local

  • Install dependencies using composer: php composer.phar install
  • Create a new MySQL database.
  • Copy config/autoload/doctrine.local.php.dist to config/autoload/doctrine.local.php and configure the database settings in it.
  • Give the webserver's user read and write permissions to the data/ and public/data/ directories.
  • Run ./web orm:schema-tool:create to populate the database.
  • Copy config/autoload/local.php.dist to config/autoload/local.php
  • Set the environment variable APP_ENV to development in your webserver configuration

Configuration for scss editing

If you need to edit stylesheets, you need to be able to compile scss files locally. For that, follow the next steps:

  • Install nodejs and npm (npm should be bundled with node).
  • Install Ruby and the Sass gem gem install sass
  • Install grunt-cli globally, npm install -g grunt-cli
  • Install local dependencies (in the directory of the GEWIS Website), npm install

To compile scss files, simply run grunt css. While working on the stylesheets, it may be nice to let grunt watch the stylesheet and automatically recomple. For this, you can run grunt watch.

Clone this wiki locally