We strongly recommend using Docker for local installation and testing.
As the Publisher works with our in-house headless newsroom management system Superdesk, we provide the complete guide how to install Superdesk equipped with Publisher integration, and the Publisher.
This is the installation procedure using the code from the repository, assuming that all requierments are met.
Keep in mind:
- Document root for Nginx vhost should be public directory.
- Configuration examples can be found in Docker directory (nginx, PHP)
- PostgreSQL must accept local connections with user
postgres:postgres
Clone Publisher repository and and follow the guide below.
Copy .env.local.example to .env.local:
cp .env.local.example .env.localcomposer installphp bin/console doctrine:database:createphp bin/console doctrine:migrations:migrateThere are two options:
- Load tenants and organization sample data fixtures
- Setup the tenant manually
If you want, you can install sample tenant data. Configuration is available in tenant.yml
php bin/console doctrine:fixtures:load --group=LoadTenantsDataphp bin/console swp:theme:install 123abc src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f -p
php bin/console swp:theme:install 456def src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f -p
php bin/console sylius:theme:assets:installSkip the next step (Setup the tenant manually)
php bin/console fos:elastica:createphp bin/console swp:organization:create PublisherPay attention to organization code which will be needed in the next step.
php bin/console swp:tenant:createPlease enter domain:publisher.local
Please enter subdomain: <skip if none>
Please enter name:SWP //(“Publisher” won’t work)
Please enter organization code: <organization code form the previous step>
Pay attention to the tenant code which will be needed in the next step.
php bin/console swp:theme:install <tenant code> src/SWP/Bundle/FixturesBundle/Resources/themes/DefaultTheme/ -f --activate
php bin/console sylius:theme:assets:installGenerate the SSH keys:
$ mkdir -p config/jwt
$ openssl genrsa -out config/jwt/private.pem -aes256 4096
$ openssl rsa -pubout -in config/jwt/private.pem -out config/jwt/public.pemIn case first openssl command forces you to input password use following to get the private key decrypted
$ openssl rsa -in config/jwt/private.pem -out config/jwt/private2.pem
$ mv config/jwt/private.pem config/jwt/private.pem-back
$ mv config/jwt/private2.pem config/jwt/private.pemFor supervisor setup (and consumers managed by it) read instructions in supervisor.md
php bin/console gos:websocket:serveror it can be started using Supervisor.