Introduction
Setup Feedier BX in Local
Install with Docker (Approx. 20 Minutes)
Prerequisites
- Clone the repository from Bitbucket
- Copy the environment file:
cp .env.example .env
Install Dependencies
Run the following command to install Composer dependencies using Docker:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php84-composer:latest \
composer install --ignore-platform-reqsEdit the configuration in the /etc/hosts of your local machine, and add the following settings:
127.0.0.1 dashboard.feedier.test api.feedier.test feedback.feedier.test bx.feedier.test api.bx.feedier.test survey.feedier.testStart the Application
- Start the containers:
./vendor/bin/sail up -d - Generate a secure Laravel key:
./vendor/bin/sail artisan key:generate - Create and migrate the database:
./vendor/bin/sail artisan migrate - Install NPM dependencies:
./vendor/bin/sail npm install - Start the Vite watcher for frontend assets:
./vendor/bin/sail npm run dev
Install Feedier-survey
This section covers setting up Feedier Survey (V2) to work alongside Feedier V4 (BX) independently on Docker.
Prerequisites
- Clone the Feedier Survey repository from Bitbucket
- Copy the environment file:
cp .env.example .env - Configure the
.envfile with your local settings (the env.example is usually already set up for local development) - Run the Docker containers:
docker compose up -d - Clone database from staging and dump it in your SQL container
Install Dependencies
Install Composer dependencies:
docker compose exec application composer installGenerate a secure Laravel key (ONLY needed if you want to run V2 in standalone mode):
docker compose exec application php artisan key:generateCreate and migrate your database:
docker compose exec application php artisan migrateInstall NPM dependencies:
docker compose exec application npm installCompile the frontend assets:
docker compose exec application gulp
Start the Application
Start Feedier Survey & Feedier V4 independently on Docker:
Make sure to have 2 distinct databases:
- One for Feedier Survey in
feedier-dashboard-v2-mysql-1container - One for Feedier V4 in
feedier-bx-mysql-1container
- One for Feedier Survey in
Run the migrations for each application
Create a new passport:client on V4:
sail artisan passport:client --name="feedier-local" --redirect_uri="http://survey.feedier.test:8888/auth/feedier/callback" sail php artisan passport:keysConfigure Feedier Survey environment variables:
Add the following to your Feedier Survey
.env:SESSION_SECURE_COOKIE=false SESSION_DOMAIN=.feedier.test APP_URL=http://bx.feedier.test:8889 APP_API_URL=http://api.feedier.test:8888 FORWARD_APP_PORT=8888 FEEDIER_BX=http://bx.feedier.test:8889 FEEDIER_WEBHOOK_URL=http://api.bx.feedier.test/v3/import/webhook/feedier_survey FEEDIER_URL_V2_API=http://api.feedier.test/v1 FEEDIER_URL_V2_DASHBOARD=http://survey.feedier.test/#/ FEEDIER_BASE_URL=http://bx.feedier.test:8889 FEEDIER_CLIENT_ID=<generated_client_id> FEEDIER_CLIENT_SECRET=<generated_client_secret> FEEDIER_REDIRECT_URI=http://survey.feedier.test:8888/auth/feedier/callbackConfigure V4 environment variables:
Add the following to your V4
.env:FEEDIER_URL_V2_API=http://api.feedier.test/v1 FEEDIER_URL_V2_DASHBOARD=http://survey.feedier.test/#/Clear configuration cache:
docker compose exec application php artisan config:clear docker compose exec application php artisan cache:clearCompile assets:
docker compose exec application gulpConnect to the application:
- Dashboard: http://survey.feedier.test:8888
- Feedback: http://feedback.feedier.test:8888
- API: http://api.feedier.test/docs#/ && http://api.feedier.test/v1
Troubleshooting
If the connection doesn't work, try accessing the application in incognito mode (clean your cache + cookies).
Services
APP LINKS
- V3: http://bx.feedier.test:8889/
- V2: http://dashboard.feedier.test/#/carriers
- V3 API: http://api.bx.feedier.test:8889/v3/
Mailpit
Mailpit is a local email testing tool, similar to Mailtrap but free and local.
- URL: http://localhost:8025/ (update according to
FORWARD_MAILPIT_DASHBOARD_PORTin.env)
Redis
Redis is an in-memory data store used for caching and message brokering.
- Host:
127.0.0.1 - User: (leave blank)
- Password: Check
.env→${REDIS_PASSWORD} - Port: Check
.env→${FORWARD_REDIS_PORT} - Documentation: https://redis.io/documentation
MySQL
MySQL is the relational database used for storing application data.
- Host:
127.0.0.1 - User: Check
.env→${DB_USERNAME} - Password: Check
.env→${DB_PASSWORD} - Database: Check
.env→${DB_DATABASE} - Port: Check
.env→${FORWARD_DB_PORT} - Documentation: https://dev.mysql.com/doc/
Selenium
Selenium is a browser automation tool used for capturing screenshot of our application.
- URL:
http://localhost:4444 - Documentation: https://www.selenium.dev/documentation/
Keycloak
Keycloak is an open-source identity and access management system for Single Sign-On (SSO) authentication.
- URL:
http://localhost:8081 - Default Credentials:
- Username:
${KEYCLOACK_USER:-admin} - Password:
${KEYCLOACK_PASSWORD:-admin}
- Username:
- Documentation: https://www.keycloak.org/documentation
MinIO
MinIO is an S3-compatible object storage service for storing files and assets.
- API URL:
http://localhost:9500 - Console URL:
http://localhost:8900 - Default Credentials:
- User:
sail - Password:
password
- User:
- Documentation: https://min.io/docs
Access the Container via SSH
For running Composer, NPM, Artisan, etc., execute:
./vendor/bin/sail shellCreate an Alias for Convenience
echo "alias sail='./vendor/bin/sail'" >> ~/.bashrc && source ~/.bashrcNow, you can use sail as a shortcut.
Do not run npm, composer, or artisan commands outside the Sail environment. Always use:
sail {npm, composer, artisan...}Synchronize Your Feedback with Elasticsearch
- Run the following command:
./vendor/bin/sail artisan scout:update - Then, process the pending jobs on Horizon:
./vendor/bin/sail php artisan horizon
Configure PHPStorm for Development
Follow these steps in order to ensure your pull requests pass pipeline checks:
- Use Docker's PHP
- Use Docker's Node
- Install ESLint
- Install Laravel Pint
This setup ensures a consistent development environment across all team members.