456b5b1375
- New: src/lib/storage.ts — S3-compatible client, uploadFile/deleteFile/listFiles/publicUrl helpers, bucket constants - New: docker-compose adds minio + minio_init services - Replaced Supabase fetch PUTs in: - src/actions/brand-settings.ts (3 uploaders) - src/actions/products/upload-image.ts - src/actions/communications/import-contacts.ts - src/app/api/water-photo-upload/route.ts - Replaced hardcoded Supabase URLs in: - src/components/storefront/TuxedoVideoHero.tsx - src/components/time-tracking/TimeTrackingFieldClient.tsx - src/app/tuxedo/about/page.tsx - src/lib/email-service.ts (4 occurrences) - Added @aws-sdk/client-s3 + @aws-sdk/s3-request-presigner - .env.example adds MinIO + storage vars - Migration cleanup: deleted BUNDLE_018_042, 4 XXX drafts, 087/145/099-contact storage migrations - Migration patches: 006 STATIC→STABLE, 135 param reordering - Preflight: added pgcrypto extension, removed storage stub - Verified: MinIO upload/list/delete round-trip works against local instance
84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: route_commerce_db
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
volumes:
|
|
- db_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "127.0.0.1:5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
postgrest:
|
|
image: postgrest/postgrest:v12.2.3
|
|
container_name: route_commerce_postgrest
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
PGRST_DB_URI: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
|
|
PGRST_DB_SCHEMA: public
|
|
PGRST_DB_ANON_ROLE: ${POSTGRES_USER}
|
|
PGRST_SERVER_PORT: 3001
|
|
PGRST_SERVER_HOST: 0.0.0.0
|
|
PGRST_OPENAPI_MODE: disabled
|
|
PGRST_DB_EXTRA_SEARCH_PATH: public,extensions
|
|
ports:
|
|
- "127.0.0.1:3001:3001"
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: route_commerce_minio
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
command: server /data --console-address ":9001"
|
|
volumes:
|
|
- minio_data:/data
|
|
ports:
|
|
- "127.0.0.1:9000:9000"
|
|
- "127.0.0.1:9001:9001"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio_init:
|
|
image: minio/mc:latest
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
entrypoint: ["/bin/sh", "-c"]
|
|
command:
|
|
- |
|
|
mc alias set local http://minio:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD}
|
|
for b in brand-logos product-images contacts-imports videos water-photos; do
|
|
mc mb --ignore-existing local/$${b}
|
|
mc anonymous set download local/$${b}
|
|
done
|
|
profiles: ["init"]
|
|
|
|
volumes:
|
|
db_data:
|
|
driver: local
|
|
minio_data:
|
|
driver: local
|