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.
{primary.fa-lightbulb-o} Prefer a traditional install on your own web server? See Installation instead.
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:
public/)php artisan queue:work database --queue=default,notifications (emails and reminders)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.
| 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
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 |
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.
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.fa-exclamation-triangle} If
vendor/is missing and Composer cannot reach the internet during the build, the image build will fail. Always runcomposer installon the host first when possible.
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
{danger.fa-lock}
DB_HOSTmust bemysqlinside Docker โ that is the Compose service name, not127.0.0.1.
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).
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.
After installation:
| Panel | URL |
|---|---|
| Super Admin | http://localhost:8080/admin |
| Business (tenant) | http://localhost:8080/manage |
| Public booking page | http://localhost:8080/{tenant-slug} |
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 |
{primary.fa-lightbulb-o} These match the
MYSQL_*variables indocker-compose.yml, not the root MySQL user. Do not userootas the application username โ the MySQL container rejectsMYSQL_USER=root.
Click Test Connection & Continue โ. If the connection succeeds, proceed to create your super-admin account.
| 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 |
| 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.
# 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.
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.fa-exclamation-triangle} If you see
getaddrinfo for mysql failedwhile running locally, your.envstill hasDB_HOST=mysql. Change it to127.0.0.1.
Docker is suitable for VPS deployments, staging environments, and local development. For production:
.env (DB_PASSWORD, MYSQL_ROOT_PASSWORD, etc.).APP_ENV=production and APP_DEBUG=false after installation.slotara_mysql, slotara_storage, slotara_logs). Use docker volume ls to inspect them.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.
| 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
{primary.fa-info-circle} For the standard (non-Docker) install path, see Installation. For Nginx/Apache on a bare server, see Web Server Setup.