Installing

Installing a project by example

Git

Find your project in our Gitlab instance and copy the ssh-based git URL. Clone your project into a subdirectory of /var/www. Then create a symlink to the webroot (/public for symfony projects) of the project into /var/www/app/<project-name>.

Example:

git clone ssh://git@gitlab.3wmedia.nl:222/project/trekkershutten.git /var/www/trekkershutten
ln -sf /var/www/trekkershutten/public /var/www/app/trekkershutten

Project configuration

Go to your fresh application directory and copy .env.dist to .env and modify the configuration where needed. Most values will have sane defaults.

Make sure that:

DATABASE_URL is using mysqlstrict:3307 instead of mysql:3306

NodeJS dependencies

Use the yarn package manager to install NodeJS project dependencies without upgrading. Use the command:

yarn --frozen-lockfile

PHP dependencies

Use the composer package manager to install PHP project dependencies:

composer install

Create database

First, create your database you configured in .env. This can be done by:

Opening https://pmastrict.php73.cms and create the database Use the doctrine console command:

php bin/console doctrine:database:create

Populate database

Then, you will need some data in your database. There are 2 options:

If you have a database copy (for example a copy of the production version) you can import it (through phpMyAdmin or through command line mysql-client) If you don’t have a database copy you can use the makefile shortcut make reset to completely reset your database and fill it with fixtures

For both versions, you will need to manually check and update the contents of the database table site_website. The domain(s) should be configured with a hostname that matches with the alias symlinked into /var/www.

In this example you can use domains like:

Domain Language
<project>.php73.cms Dutch
en.<project>.php73.cms English
de.<project>.php73.cms German
fr.<project>.php73.cms French

WARNING

Never add www. to the domain in the database

Prepare the project

Finally, you can use the following command to prepare your project for development.

make upgrade_dev

This will:

clear symfony cache run database migrations install nodejs dependencies build frontend application using webpack run upgraded dependency scripts Running the application¶ Afterwards https://trekkershutten.php73.cms will be available (or .php74.cms for example, but we are currently running PHP 7.3).

Webpack devserver

When you are planning to work on the frontend of the application you can use the following command to start the webpack devserver (this will use hot-reloading and file watchers to update the frontend after each file modification).

make node_start_hot