Skip to content

Getting Started

The Brunago API is in development. Some endpoints or data may change.

Staging Environment

plaintext
https://api.brunago.sk

Installation

Prerequisites

  • Docker
  • Make sure no other web servers or databases are running on the following ports:
    • 80 (Application)
    • 5432 (PostgreSQL)
    • 6379 (Redis)
    • 8108 (Typesense)
    • 9000 (MinIO)
    • 8900 (MinIO Console)
    • 8025 (Mailpit)
    • 1025 (Mailpit SMTP)

Steps

Clone the Repository

shell
git clone https://github.com/brunagosk/api.git

Create the Environment File

shell
cp .env.example .env

Install Composer Dependencies

shell
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php85-composer:latest \
composer install --ignore-platform-reqs

Start Laravel Sail

shell
./vendor/bin/sail up

(Use -d for detached mode.)

Install Node Dependencies

shell
./vendor/bin/sail bun install

Generate Application Key

shell
./vendor/bin/sail artisan key:generate

Run Migrations

shell
./vendor/bin/sail artisan migrate:fresh --seed

Access Points

Once Sail is running, you can access:

Application

plaintext
http://localhost

Mailpit (Email Testing)

plaintext
http://localhost:8025

MinIO Console (S3-Compatible Storage)

plaintext
http://localhost:8900
  • Username: sail
  • Password: password

Services

The application uses the following Docker services:

  • PostgreSQL 18 - Main database (port 5432)
  • Redis - Cache and queue driver (port 6379)
  • Typesense 30.1 - Search engine (port 8108)
  • MinIO - S3-compatible file storage (ports 9000, 8900)
  • Mailpit - Email testing (ports 1025, 8025)

Rebuilding Container Images

shell
./vendor/bin/sail build --no-cache

Container Shell

shell
./vendor/bin/sail shell

Executing Commands

  • Artisan

    • Locally: php artisan route:list
    • Via Sail: ./vendor/bin/sail artisan route:list
  • PHP

    shell
    ./vendor/bin/sail php --version
    ./vendor/bin/sail php script.php
  • Composer

    shell
    ./vendor/bin/sail composer dump-autoload