Skip to main content
This guide will walk you through setting up DocuCast on your local machine for development. The project uses Docker Compose to provide a consistent and isolated environment.

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.
1

Clone the Repository

First, clone the DocuCast repository to your local machine.
git clone https://github.com/your-org/docucast.git
cd docucast
2

Install PHP and Node.js Dependencies

Install the required backend and frontend packages.
composer install
npm install
3

Environment Configuration

Create a copy of the example environment file.
cp .env.example .env
Generate the application key:
php artisan key:generate
4

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:
docker compose up -d
The first time you run this command, Docker will download and build the necessary images, which may take a few minutes.
5

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):
php artisan migrate
Or inside the Docker container:
docker compose exec app php artisan migrate
Next, build the frontend assets using Vite:
npm run build
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