Skip to content

Latest commit

 

History

History
133 lines (86 loc) · 2.77 KB

INSTALL.md

File metadata and controls

133 lines (86 loc) · 2.77 KB

How to build it with docker (development purposes):

Setup

Execute below commands inside docker folder of that repository.

Build

docker-compose build

Run

docker-compose up -d

Pre-configuration

Make sure to adapt the following values in your configuration file:

# app/config/parameters.yml
parameters:
    database_host: postgres
    database_user: postgres

Install

Install all dependencies:

docker-compose run php composer install

Post-configuration

Create database:

docker-compose run php app/console doctrine:database:create

Update database schema using Doctrine migrations:

docker-compose run php app/console doctrine:migrations:migrate

Load fixtures:

docker-compose run php app/console doctrine:fixtures:load

Install demo theme:

docker-compose run php app/console swp:theme:install 123abc src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f
docker-compose run php app/console sylius:theme:assets:install

Preview

Go to http://localhost:8080/app_dev.php for viewing the app in dev mode.

Local installation:

Clone Publisher repository and and follow the guide below.

Install all dependencies:

composer install

Updating database schema and creating the default tenant

Execute the following commands in terminal:

php app/console doctrine:migrations:migrate
php app/console swp:organization:create --default
php app/console swp:tenant:create --default

swp:tenant:create --default console command, creates a new, default tenant which is needed to run the Publisher.

Alternatively, in the development environment, to populate the database with test data (including a default tenant), you can create the database and load fixtures with the following sequence of commands

php app/console doctrine:migrations:migrate
php app/console doctrine:fixtures:load

You should also install a theme. To install our demo DefaultTheme - run following commands:

In case of loaded development data:

php app/console swp:theme:install 123abc src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f

else:

php app/console swp:theme:install <tenant> src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f

where <tenant> is tenant's code generated when a new tenant is created.

The last step is to install assets:

php app/console sylius:theme:assets:install

Run RabbitMQ consumers

For supervisor setup (and consumers managed by it) read instructions in supervisor.md

Preview

Run project with built in php server:

php app/console server:start publisher.dev

Replace publisher.dev with your domain parameter value configured on composer installation.