Isha Labs Support

Docker Installation

Updated Oct 17, 2026

Slotara ships with a ready-to-use Docker Compose stack. You do not need PHP, MySQL, Nginx, Supervisor, or Node.js installed on your host machine — Docker runs everything in containers.

Note: Prefer a traditional install on your own web server? See Installation instead.


Overview

The Docker setup builds two services:

Service Image Host URL / Port
app Custom (PHP 8.3 + Nginx + Supervisor) http://localhost:8080
mysql MySQL 8.0 localhost:3307 (optional external access)

The app container automatically runs:

  • Nginx — web server (document root: public/)
  • PHP-FPM — PHP 8.3 with all required extensions
  • Queue worker — php artisan queue:work database (emails)
  • Scheduler — php artisan schedule:work (reminders, backups, calendar sync)

Pre-compiled front-end assets in public/build/ are included in the image — no npm build is required for a standard install.


Prerequisites

Required

Requirement Minimum
Docker 24+ (Docker Desktop on macOS/Windows, or Docker Engine on Linux)
Docker Compose v2 (docker compose command)
Composer (host) 2.x — run composer install --no-dev before building if vendor/ is missing
Free disk space ~2 GB for images and volumes

Verify Docker is running:

docker --version
docker compose version

What's Included

These files are added to the project root for Docker:

File / Folder Purpose
Dockerfile Builds the PHP + Nginx app image
docker-compose.yml Defines app and mysql services
.env.docker.example Environment template tuned for Docker
.dockerignore Keeps the build context lean
docker/nginx/default.conf Nginx virtual host
docker/php/local.ini PHP upload/memory limits
docker/supervisor/supervisord.conf Runs web, queue, and scheduler processes
docker/entrypoint.sh Waits for MySQL, sets permissions, creates storage link

Quick Start

From the project root:

# 1 — Install PHP dependencies (if vendor/ is not present)
composer install --no-dev --optimize-autoloader

# 2 — Copy the Docker environment file
cp .env.docker.example .env

# 3 — Build and start containers
docker compose up -d --build

# 4 — Open the web installer
open http://localhost:8080/install

Complete the web installer (Requirements → Permissions → Database → Admin → Finish). Use the database credentials from the table in the next section.

When installation finishes, log in at http://localhost:8080/admin.


Step-by-Step Setup

1. Install PHP dependencies

The Docker build copies your local vendor/ folder into the image. If you extracted a fresh ZIP without dependencies:

composer install --no-dev --optimize-autoloader

Warning: If vendor/ is missing and Composer cannot reach the internet during the build, the image build will fail. Always run composer install on the host first when possible.

2. Configure environment

cp .env.docker.example .env

Key defaults in .env.docker.example:

APP_URL=http://localhost:8080
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=slotara
DB_USERNAME=slotara
DB_PASSWORD=secret
APP_PORT=8080
MYSQL_PORT=3307

Important: DB_HOST must be mysql inside Docker — that is the Compose service name, not 127.0.0.1.

3. Build and start

docker compose up -d --build

First run downloads the MySQL image and builds the app image (may take a few minutes).

Check status:

docker compose ps

Both app and mysql should show Up (mysql: healthy).

4. Run the web installer

Open:

http://localhost:8080/install

Follow the same six steps described in Installation. The installer writes your admin account, runs migrations, and creates the .installed lock file.

5. Log in

After installation:

Panel URL
Super Admin http://localhost:8080/admin
Business (tenant) http://localhost:8080/manage
Public booking page http://localhost:8080/{tenant-slug}

Web Installer (Database Settings)

On Step 4 — Database, enter the Docker MySQL credentials (defaults from .env.docker.example):

Field Value
Host mysql
Port 3306
Database Name slotara
Username slotara
Password secret

Note: These match the MYSQL_* variables in docker-compose.yml, not the root MySQL user. Do not use root as the application username — the MySQL container rejects MYSQL_USER=root.

Click Test Connection & Continue →. If the connection succeeds, proceed to create your super-admin account.


Environment Variables

App service

Variable Default Description
APP_PORT 8080 Host port mapped to container port 80
APP_URL http://localhost:8080 Must include the port when not using 80
DB_HOST mysql Docker Compose service name
DB_DATABASE slotara Application database name
DB_USERNAME slotara Application database user
DB_PASSWORD secret Application database password

MySQL service

Variable Default Description
MYSQL_DATABASE slotara Database created on first start
MYSQL_USER slotara Non-root user for the app
MYSQL_PASSWORD secret Password for MYSQL_USER
MYSQL_ROOT_PASSWORD rootsecret Root password (admin/backup use)
MYSQL_PORT 3307 Host port for external DB tools (TablePlus, etc.)

Change passwords before any production deployment.


Daily Commands

# Start containers (background)
docker compose up -d

# Stop containers (keeps data volumes)
docker compose down

# View logs (all services)
docker compose logs -f

# View app logs only
docker compose logs -f app

# Rebuild after code or Docker config changes
docker compose up -d --build

# Run an Artisan command inside the app container
docker compose exec app php artisan migrate:status

# Open a shell inside the app container
docker compose exec app bash

# Reset everything including database (destructive)
docker compose down -v

After docker compose down -v, you must run the web installer again from scratch.


Switching Between Docker and Local Dev

If you alternate between Docker and php artisan serve on the same machine, use different .env values:

Setting Docker Local (php artisan serve)
DB_HOST mysql 127.0.0.1
DB_PORT 3306 3306 (or your local MySQL port)
APP_URL http://localhost:8080 http://127.0.0.1:8000

Tip — keep two env files:

# Save current local settings
cp .env .env.local

# Switch to Docker
cp .env.docker.example .env
docker compose up -d --build

# Switch back to local
cp .env.local .env
php artisan config:clear
php artisan serve

Warning: If you see getaddrinfo for mysql failed while running locally, your .env still has DB_HOST=mysql. Change it to 127.0.0.1.


Production Notes

Docker is suitable for VPS deployments, staging environments, and local development. For production:

  1. Change all default passwords in .env (DB_PASSWORD, MYSQL_ROOT_PASSWORD, etc.).
  2. Set APP_ENV=production and APP_DEBUG=false after installation.
  3. Put a reverse proxy (Traefik, Caddy, or Nginx on the host) in front of the container for HTTPS — Stripe and reCAPTCHA require HTTPS in production.
  4. Back up volumes — data lives in Docker volumes (slotara_mysql, slotara_storage, slotara_logs). Use docker volume ls to inspect them.
  5. Do not expose MySQL port 3307 publicly unless required — remove the ports: mapping under mysql in docker-compose.yml for hardened deployments.

Queue worker and scheduler are already included in the app container via Supervisor — no separate Supervisor or cron setup is needed when using this stack.


Troubleshooting

Symptom Likely Cause Fix
Redirect to http://localhost/install (no port) → 404 Nginx passed host without port to PHP Rebuild the app image: docker compose build app && docker compose up -d (fixed in docker/nginx/default.conf)
getaddrinfo for mysql failed (local, not Docker) .env still has Docker DB host Set DB_HOST=127.0.0.1 and run php artisan config:clear
MySQL container unhealthy / won't start MYSQL_USER=root in compose env Use slotara user — see .env.docker.example; run docker compose down -v and start fresh
Blank page or 502 on :8080 App container still starting Wait 30s, then docker compose logs app
"Unable to connect to database" in installer Wrong host or credentials Use host mysql, user slotara, password secret (or your custom values)
Build fails at composer install No vendor/ and network error Run composer install --no-dev on the host first, then rebuild
Changes to code not visible Code is baked into the image Rebuild: docker compose up -d --build
Need to reinstall .installed exists docker compose exec app rm -f .installed then visit /install, or docker compose down -v for a full reset
Port 8080 already in use Another service on 8080 Set APP_PORT=8081 in .env and update APP_URL accordingly

View application errors:

docker compose logs -f app
docker compose exec app tail -f storage/logs/laravel.log

Note: For the standard (non-Docker) install path, see Installation. For Nginx/Apache on a bare server, see Web Server Setup.