Run development on the production stack with a Vite dev server
docker-compose.dev.yml extends docker-compose.yml, so development runs the scheduler too, and takes its settings from .env, which selects the file through COMPOSE_FILE. The dev image is a stage of the Dockerfile and shares the production image's PHP extensions; the app listens on port 80 as in production. A vite service runs the dev server with hot reload. No ports are published: OrbStack serves https://app.sealshare.orb.local and https://vite.sealshare.orb.local, with the ports pinned by label. Without OrbStack, docker-compose.ports.yml publishes APP_PORT and VITE_PORT on 127.0.0.1. vite.config.js takes the dev server's address from VITE_DEV_SERVER_URL and listens on IPv4 and IPv6, as OrbStack's proxy connects over either. Each start installs Composer packages, clears caches, migrates and links storage. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
9bb144577b
commit
026912f98a
@@ -52,15 +52,35 @@ A simple, self-hosted file sharing solution built with Laravel. Upload files, ge
|
||||
|
||||
### Docker (recommended)
|
||||
|
||||
```bash
|
||||
# Build and start the dev container
|
||||
docker compose -f docker-compose.dev.yml up -d --build
|
||||
`docker-compose.dev.yml` extends the production stack (`docker-compose.yml`, app and scheduler): the checkout mounted at `/app`, Octane reloading on PHP changes, and a Vite dev server with HMR. `.env` selects it through `COMPOSE_FILE`, so plain `docker compose` commands work.
|
||||
|
||||
# View logs (including Vite output)
|
||||
docker compose -f docker-compose.dev.yml logs -f
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# Set APP_KEY (composer setup generates one) and the values for your setup (below)
|
||||
|
||||
# Build and start the app, the scheduler and Vite
|
||||
docker compose up -d --build
|
||||
|
||||
# View logs
|
||||
docker compose logs -f
|
||||
```
|
||||
|
||||
The app is available at `http://localhost:8000` with Vite HMR on port `5173`.
|
||||
With [OrbStack](https://orbstack.dev), no ports are published: set these in `.env` and open `https://app.sealshare.orb.local`. Uploads need HTTPS or `localhost`, because browsers only encrypt files there.
|
||||
|
||||
```dotenv
|
||||
COMPOSE_FILE=docker-compose.dev.yml
|
||||
APP_URL=https://app.sealshare.orb.local
|
||||
VITE_DEV_SERVER_URL=https://vite.sealshare.orb.local
|
||||
```
|
||||
|
||||
Without OrbStack, publish the ports on `127.0.0.1` and open `http://localhost:8000` (change the ports with `APP_PORT` and `VITE_PORT`):
|
||||
|
||||
```dotenv
|
||||
COMPOSE_FILE=docker-compose.dev.yml:docker-compose.ports.yml
|
||||
APP_URL=http://localhost:8000
|
||||
```
|
||||
|
||||
The containers read `.env` when they are created: run `docker compose up -d` again after changing it.
|
||||
|
||||
|
||||
## Installation — Production
|
||||
|
||||
Reference in New Issue
Block a user