2acfb1cdf5
Add container definitions for the web app, API, worker, and PostGIS database so the local stack can be built and run consistently.
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
services:
|
|
db:
|
|
image: postgis/postgis:16-3.4
|
|
environment:
|
|
POSTGRES_DB: leads4less
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: change-me
|
|
volumes:
|
|
- leads4less-db:/var/lib/postgresql/data
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
target: api
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
NODE_ENV: production
|
|
APP_HOST: 0.0.0.0
|
|
APP_PORT: 4000
|
|
APP_ORIGIN: https://app.example.com
|
|
DATABASE_URL: postgres://postgres:change-me@db:5432/leads4less
|
|
COOKIE_SECRET: replace-with-long-random-secret
|
|
GOOGLE_MAPS_SERVER_KEY: your-server-key
|
|
PG_BOSS_SCHEMA: pgboss
|
|
SESSION_TTL_DAYS: 30
|
|
expose:
|
|
- "4000"
|
|
|
|
worker:
|
|
build:
|
|
context: .
|
|
target: worker
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
NODE_ENV: production
|
|
DATABASE_URL: postgres://postgres:change-me@db:5432/leads4less
|
|
COOKIE_SECRET: replace-with-long-random-secret
|
|
GOOGLE_MAPS_SERVER_KEY: your-server-key
|
|
PG_BOSS_SCHEMA: pgboss
|
|
SESSION_TTL_DAYS: 30
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
target: web
|
|
args:
|
|
VITE_API_BASE_URL: https://api.example.com/api
|
|
VITE_GOOGLE_MAPS_PLATFORM_KEY: your-browser-key
|
|
depends_on:
|
|
- api
|
|
expose:
|
|
- "80"
|
|
|
|
volumes:
|
|
leads4less-db:
|