A personal audio streaming server — Laravel API + Vue 3 frontend.
- Docker and Docker Compose
# 1. Clone the repo
git clone https://github.com/ttndevfullstack/music_box_stream_player.git
cd musicbox
# 2. Create your environment file
cp .env.example .env
# Set APP_KEY (must be a 32-byte base64 string) and fill in DB credentials
sed -i "s/^APP_KEY=.*/APP_KEY=base64:$(openssl rand -base64 32)/" .env
# 3. Build and start the stack
docker compose up -d --build
# 4. Open in browser
open http://localhost:8000The app container generates Passport keys and runs pending migrations automatically on first start.
The dev compose override bind-mounts the source into the app and nginx containers (PHP edits apply immediately) and runs a Vite dev server container with hot module reload.
cp .env.example .env
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build- App: http://localhost:8000
- Vite dev server (HMR): http://localhost:5173
- MySQL exposed on host port 3306 for a DB client
Run PHP tests inside the app container:
docker compose exec app php artisan testRun frontend lint/unit tests on the host (or docker compose exec vite sh):
yarn lint
yarn testCreate a .env file in the project root (copy .env.example as a starting point). Key variables:
| Variable | Required | Default | Description |
|---|---|---|---|
APP_KEY |
Yes | — | Laravel encryption key (php artisan key:generate) |
APP_URL |
No | http://localhost |
Public URL of the app |
DB_DATABASE |
Yes | laravel |
MySQL database name |
DB_USERNAME |
Yes | root |
MySQL username |
DB_PASSWORD |
Yes | — | MySQL password |
DB_HOST/DB_PORT are fixed to the mysql service by docker-compose.yml and don't need to be set in .env.
| File | Purpose |
|---|---|
docker-compose.yml |
Production stack: app (PHP-FPM), nginx, mysql |
docker-compose.dev.yml |
Dev override: bind mounts, Vite HMR service, exposed MySQL port |
Application data persists in the mysql_data named volume.
Laravel 10 · PHP 8.3 · Laravel Passport · MySQL 8 · Vue 3 + Vite · Tailwind CSS · Nginx · Docker