This is a Laravel application using Inertia.js and deployed with Docker.
- Docker and Docker Compose installed on your machine.
Follow these steps to get the project up and running in your local environment.
Run the following command to build the images and start the containers in the background:
docker compose up -d --buildExecute composer install inside the application container:
docker-compose exec app composer installCopy the example environment file and generate a unique application key:
# Copy .env
copy .env.example .env
# Generate APP_KEY inside the container
docker-compose exec app php artisan key:generateInstall the NPM packages for the frontend:
docker-compose exec app npm installCompile the frontend assets:
docker-compose exec app npm run buildRun the database migrations to set up your tables:
docker-compose exec app php artisan migratePopulate the database with fake data by running the seeder. This seeder is located at database/seeders/FakeDataSeeder.php and it creates a test user for you to log in:
docker-compose exec app php artisan db:seed --class=FakeDataSeederAfter running the FakeDataSeeder, you can log in to the application using the following test credentials:
- Email:
testuser@theflock.com - Password:
testinguser
Backend tests for the controllers and other PHP logic are located in the /tests directory. To run them, execute:
docker-compose exec app php artisan testFrontend tests for the Vue/React/Svelte/Alpine components are located in the /resources/js directory and have the .test.js extension. To run them, execute:
docker-compose exec app npm run testIf you encounter timeout issues during composer install, you can run it with an increased timeout like so:
docker-compose exec app bash -c "COMPOSER_PROCESS_TIMEOUT=600 composer install --no-interaction --prefer-dist"