chore: automate docker deployment startup
This commit is contained in:
@@ -35,6 +35,22 @@ If you open the app from another machine on your LAN, set `VITE_API_BASE_URL` an
|
||||
4. Start the worker:
|
||||
`npm run dev:worker`
|
||||
|
||||
## Docker Deployment
|
||||
|
||||
1. Copy `.env.example` to `.env` and set at least:
|
||||
- `DATABASE_URL` to the Compose database host, for example `postgres://postgres:YOUR_PASSWORD@db:5432/leads4less`
|
||||
- `POSTGRES_DB`
|
||||
- `POSTGRES_USER`
|
||||
- `POSTGRES_PASSWORD`
|
||||
- `COOKIE_SECRET`
|
||||
- `GOOGLE_MAPS_SERVER_KEY`
|
||||
- `VITE_API_BASE_URL`
|
||||
- `VITE_GOOGLE_MAPS_PLATFORM_KEY`
|
||||
2. Build and start the full stack:
|
||||
`docker compose up --build`
|
||||
|
||||
The Compose stack starts PostGIS, waits for the database to become healthy, runs migrations automatically, and then starts the API, worker, and web containers.
|
||||
|
||||
## Database Layout
|
||||
|
||||
- `db/migrations/0001_local_core.sql` creates the local-first schema.
|
||||
|
||||
Reference in New Issue
Block a user