Pixel Fox is a small web application powered by Laravel, RabbitMQ, Pusher and MySQL, configured using Docker for local development. It uses a pyxelate tool https://github.com/sedthh/pyxelate/ to convert your image to pixel art.
Follow these steps to set up the project on your local machine.
Copy the .env-copy file in the root directory and rename it to .env:
cp .env-copy .envEdit the file and make sure to provide the following values:
USERNAME=user
GROUPNAME=user
RABBITMQ_DEFAULT_USER=guest
RABBITMQ_DEFAULT_PASS=guestThese variables are used for setting up Docker user permissions and RabbitMQ credentials.
Copy the .env-copy file inside the src/ directory and rename it to .env:
cp src/.env-copy src/.envEdit the file to match your database configuration and other Laravel environment settings including RabbitMQ settings and Pusher credentials.
Install mkcert on your machine (if you haven’t already).
Then generate certificates:
mkcert -install
mkcert pixel-fox.testMove the generated certificates (pixel-fox.test.pem and pixel-fox.test-key.pem) into the nginx/ssl/ folder:
mv pixel-fox.test.pem nginx/ssl/
mv pixel-fox.test-key.pem nginx/ssl/In the project root directory, run:
docker-compose up -dThis will start the MySQL database, Laravel app, and Nginx server.
On your host machine (not inside Docker), install Node dependencies and build the frontend assets:
cd src
npm install
npm run buildThis step compiles JavaScript (including Echo + Pusher setup) and is required for broadcasting to work.
Laravel migration will be executed automatically by docker-entrypoint.sh when the MySQL database will be ready.
Run queue worker to process requests from the site.
docker-compose exec app php artisan queue:workVisit https://pixel-fox.test in your browser.
Make sure pixel-fox.test points to 127.0.0.1 in your system's /etc/hosts file:
127.0.0.1 pixel-fox.test
You can now start working on the Pixel Fox project.