Docker
CI / ci (push) Canceled after 0s

This commit is contained in:
Stefan Lazic committed 2026-09-05 08:36:54 +01:00
1 parent 2ef3654841
commit c4325018e0
7 files changed
+312 -23

No files matched your search

+48 -4
View File
@@ -5,10 +5,9 @@ The application is being rebuilt as a conventional Laravel web application
using PHP, MySQL, Blade, Tailwind CSS, Alpine.js, and Vite.
The audited Next.js implementation is preserved in [`legacy-nextjs`](legacy-nextjs)
as the functional and visual migration reference. Deployment-specific files
from the previous implementation are retained there for reference only; the
Laravel application does not manage Docker, Caddy, Nginx, or server
provisioning.
as the functional and visual migration reference. The Laravel application has
its own deployment-neutral Docker option at the repository root; files inside
`legacy-nextjs` are not used by it.
## Local development
@@ -26,6 +25,51 @@ application resolves a business from the request hostname through the
`business_domains` table. Local development can use a configured local domain
or the `APP_DEFAULT_BUSINESS_SLUG` fallback.
## Docker deployment
The root `compose.yaml` runs Laravel with PHP 8.4 FPM, Nginx, MySQL 8,
the database-backed queue worker, and the scheduler. It does not include or
configure Caddy; an existing reverse proxy can forward traffic to Nginx on
`127.0.0.1:8085`.
First run:
```bash
cp .env.example .env
```
Set private values in `.env`, including:
```dotenv
APP_URL=http://localhost:8085
APP_KEY=
DB_HOST=db
DB_DATABASE=nextchair
DB_USERNAME=nextchair
DB_PASSWORD=replace-with-a-private-password
DB_ROOT_PASSWORD=replace-with-a-private-root-password
```
Then build and start the stack:
```bash
docker compose build
docker compose up -d
docker compose exec app php artisan key:generate
docker compose exec app php artisan migrate
```
Migrations are intentionally not run by container startup. To inspect the
application logs:
```bash
docker compose logs -f app nginx queue scheduler db
```
The default host binding is `127.0.0.1:8085:80`. Override it with
`NEXTCHAIR_HTTP_BIND` and `NEXTCHAIR_HTTP_PORT` in `.env` when needed. MySQL
has no published host port and is reachable only as `db:3306` inside Compose.
## Verification
```bash