Studio
#
Launching dev environment#
Install the php_redis module on MAMPRun the following command:
cd /Applications/MAMP/bin/php/php7.4.2/bin && ./pecl install redis
Then, add extension="redis.so"
in the php.ini
file.
#
ComposerGo in the project folder and run the following command to install the dependencies:
composer install
#
GulpGo in the project folder and run the following command to install the dependencies:
gulp
#
RedisTo install Redis, run the following command:
brew install redis
To launch Redis, run the following command:
brew services start redis
#
MailHogTo install MailHog, run the following command:
brew update && brew install mailhog
To launch MailHog, run the following command:
MailHog
#
Asynchronous consumer (Messenger)To launch the Messenger, run the following command:
bin/console messenger:consume async -vv
Not the Messenegr should be stopped and relaunched at each code change.
#
ImmortalIt is possible to make the Messenger immortal by using Immortal.
immortal bash immortal.sh
To watch the current commands managed by Immortal:
immortalctl
#
Node Package eXecute (NPX) / Serverless Stack (SST)In production, the visuals are generated through a production-ready AWS Lambda function. For development, it is possible to run a function that uses the local Chrome browser to render the visuals.
To launch the local function, go in the Lambda
project and run the following command:
npx sst start
To deploy a new version in production, run the follow command:
npx sst deploy --stage prod
Note that deploying a new version in production will require some additional steps:
- Create a new version and alias in AWS Lambda
- Remove the provisioned concurrency on the previous version
- Add the provisioned concurrency on the new version
- Update the
chrome_warmer
rule on AWS EventBridge to warm the new version - Update the
.env
file with the new version number and deploy to the production production - Clear the Symfony cache with
bin/console cache:clear
- Stop Immortal on the production server and check
ps aux | grep consome
to ensure everything is fully stopped - Start again Immortal on the production server