Removes the postgrest host port (3000:3000) that the README already flagged as local-dev-only. Adds SERVICE_FQDN_POSTGREST_3000 / SERVICE_FQDN_TRIPS_WEB_8080 environment hints so Coolify auto-wires Traefik routing to the correct container ports when this stack is deployed as a Docker Compose resource. Local dev: re-add ports via a gitignored compose/docker-compose.override.yaml. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
40 lines
1.7 KiB
YAML
40 lines
1.7 KiB
YAML
services:
|
|
postgrest:
|
|
image: postgrest/postgrest:v12.2.3
|
|
restart: always
|
|
expose:
|
|
- "3000"
|
|
extra_hosts:
|
|
# In Coolify the DB is reached via host.docker.internal; locally we override
|
|
# VIZ_DB_HOST in .env to stage.rahamafresh.com.
|
|
- "host.docker.internal:host-gateway"
|
|
environment:
|
|
PGRST_DB_URI: postgres://${VIZ_DATA_USER:-viz_anon}:${VIZ_DATA_PASSWORD}@${VIZ_DB_HOST:-host.docker.internal}:${VIZ_DB_PORT:-5433}/${VIZ_DB_NAME:-tracksolid_db}?sslmode=disable
|
|
PGRST_DB_SCHEMAS: public
|
|
PGRST_DB_ANON_ROLE: ${VIZ_DATA_USER:-viz_anon}
|
|
PGRST_DB_MAX_ROWS: "10000"
|
|
PGRST_OPENAPI_SERVER_PROXY_URI: ${PGRST_PUBLIC_URL:-http://localhost:3000}
|
|
PGRST_SERVER_CORS_ALLOWED_ORIGINS: ${TRIPS_WEB_URL:-http://localhost:5173}
|
|
# Coolify magic: triggers FQDN assignment + Traefik routing to port 3000.
|
|
# Set the actual FQDN in the Coolify resource's Domains panel.
|
|
SERVICE_FQDN_POSTGREST_3000: ${PGRST_PUBLIC_URL}
|
|
# No host port binding for Coolify. For local dev, drop a
|
|
# compose/docker-compose.override.yaml that re-adds: ports: ["3000:3000"].
|
|
|
|
trips_web:
|
|
build:
|
|
context: ../web
|
|
dockerfile: Dockerfile
|
|
args:
|
|
VITE_API_URL: ${VITE_API_URL:-https://api.trips.rahamafresh.com}
|
|
VITE_MAPBOX_TOKEN: ${VITE_MAPBOX_TOKEN}
|
|
restart: always
|
|
expose:
|
|
- "8080"
|
|
environment:
|
|
# Coolify magic: triggers FQDN assignment + Traefik routing to port 8080.
|
|
# Set the actual FQDN in the Coolify resource's Domains panel.
|
|
SERVICE_FQDN_TRIPS_WEB_8080: ${TRIPS_WEB_URL}
|
|
depends_on:
|
|
- postgrest
|
|
# For local dev, prefer running `pnpm dev` directly against postgrest.
|