Prerequisites
Before you begin, ensure you have the following installed on your machine:- Docker Desktop (or Docker Engine + Docker Compose)
- Composer (PHP dependency manager)
- Node.js & npm (Frontend dependency manager)
- Git
Setup Guide
Follow these steps to get the application running locally.Environment Configuration
Create a copy of the example environment file.Generate the application key:
Start the Docker Environment
DocuCast uses Docker Compose to run PostgreSQL, Redis, Traefik, Nginx, the PHP app, and the Reverb WebSocket server.Start all services in detached mode:
Run Migrations and Build Assets
Once the database container is up and running, execute the database migrations.
Since the application is running inside Docker, you can run the migrations either locally (if you have PHP/PostgreSQL extensions) or inside the container.Using local PHP (requires local PostgreSQL extensions):Or inside the Docker container:Next, build the frontend assets using Vite:For continuous asset building during development, use
npm run dev.Accessing the Application
Once everything is up and running, you can access the application through Traefik’s routing:- Web Application:
http://docucast.localhost - Reverb WebSockets: Routed automatically via Traefik on the same host path.
Useful Commands
Here are some helpful commands during local development:- View container logs:
docker compose logs -f - Stop the environment:
docker compose down - Access the app container shell:
docker compose exec app bash