Prezly Application
Native MacOS installation
Clone the project
Configure PostgreSQL:
- Install by running
brew install postgresql - Open PostgreSQL CLI:
psql postgres - Crate user and database by running:sql
CREATE DATABASE prezlydb; CREATE USER prezly WITH PASSWORD 'secret'; GRANT ALL PRIVILEGES ON DATABASE prezlydb TO prezly; - Close connection by typing
\q+ Enter
- Install by running
Install Redis by running
pecl install redisInstall Meilisearch:
brew install meilisearch+brew services start meilisearchConfigure Apache and PHP (article)
brew install httpd phpEdit
/opt/homebrew/etc/httpd/httpd.confChange
Listen 8080->Listen 80Uncomment following lines
#Include /opt/homebrew/etc/httpd/extra/httpd-vhosts.conf#LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
Add following lines to the end of the config file
LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so <IfModule php_module> <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch> <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> </IfModule>Create
/opt/homebrew/etc/httpd/extra/httpd-php.confwith following contents:<VirtualHost *:80> ServerName rock.prezly.test DocumentRoot /[path to project]/web <Directory /[path to project]/web> Require all granted # Enable rewrite engine and set base directory (adjust if needed) RewriteEngine On RewriteBase / # Don't rewrite existing files or directories RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other requests to index.html RewriteRule ^ index.php [L] </Directory> </VirtualHost>
Start services
brew services start httpd
Copy
.env.distfile and rename to.env, and set:PREZLY_WEBPACK_LIVERELOAD=truePREZLY_DEBUG_EMAIL_ADDRESS=xxxxx@prezly.com
Open project root directory and run commands:
make hosts+ add following lines to/etc/hosts127.0.0.1 postgres 127.0.0.1 redis 127.0.0.1 meilisearchmake wipe
Install Composer:
brew install composerCreate a symlink (see Slack thread)
- Run in a root project directory
ln -fs $(realpath vendor/rock-symphony/propel-orm-plugin) plugins/propelOrmPlugin
- Run in a root project directory
Install dependencies:
composer install+composer updateRun Webpack watch server:
cd apps/backend+make watch