Add asset metadata, sharing, and MinIO-backed signed links.
CI / test (pull_request) Successful in 4s
CI / test (pull_request) Successful in 4s
This introduces deduplicated per-user image/3D asset records linked into feature properties, adds visibility-controlled download routing, and wires local S3-compatible storage with automatic bucket bootstrap in Docker Compose. Made-with: Cursor
This commit is contained in:
@@ -16,6 +16,42 @@ services:
|
||||
start_period: 10s
|
||||
restart: unless-stopped
|
||||
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
container_name: momswap-backend-minio
|
||||
environment:
|
||||
MINIO_ROOT_USER: "${S3_ACCESS_KEY:-momswap}"
|
||||
MINIO_ROOT_PASSWORD: "${S3_SECRET_KEY:-momswap-secret}"
|
||||
command: server /data --console-address ":9001"
|
||||
volumes:
|
||||
- ./var/minio:/data
|
||||
ports:
|
||||
- "8774:9001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
restart: unless-stopped
|
||||
|
||||
minio-init:
|
||||
image: minio/mc:latest
|
||||
container_name: momswap-backend-minio-init
|
||||
environment:
|
||||
S3_ACCESS_KEY: "${S3_ACCESS_KEY:-momswap}"
|
||||
S3_SECRET_KEY: "${S3_SECRET_KEY:-momswap-secret}"
|
||||
S3_BUCKET: "${S3_BUCKET:-momswap-assets}"
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
mc alias set local http://minio:9000 $$S3_ACCESS_KEY $$S3_SECRET_KEY &&
|
||||
mc mb --ignore-existing local/$$S3_BUCKET
|
||||
"
|
||||
restart: "no"
|
||||
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
@@ -29,11 +65,22 @@ services:
|
||||
ADDR: ":8122"
|
||||
ADMIN_PUBLIC_KEY: "${ADMIN_PUBLIC_KEY:-}"
|
||||
DATABASE_URL: "postgres://${POSTGRES_USER:-momswap}:${POSTGRES_PASSWORD:-momswap}@db:5432/${POSTGRES_DB:-momswap}?sslmode=disable"
|
||||
S3_ENDPOINT: "${S3_ENDPOINT:-minio:9000}"
|
||||
S3_BUCKET: "${S3_BUCKET:-momswap-assets}"
|
||||
S3_REGION: "${S3_REGION:-us-east-1}"
|
||||
S3_ACCESS_KEY: "${S3_ACCESS_KEY:-momswap}"
|
||||
S3_SECRET_KEY: "${S3_SECRET_KEY:-momswap-secret}"
|
||||
S3_USE_PATH_STYLE: "${S3_USE_PATH_STYLE:-true}"
|
||||
S3_USE_TLS: "${S3_USE_TLS:-false}"
|
||||
volumes:
|
||||
- ./etc:/app/etc:ro
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_healthy
|
||||
minio-init:
|
||||
condition: service_completed_successfully
|
||||
ports:
|
||||
- "8122:8122"
|
||||
restart: unless-stopped
|
||||
@@ -52,11 +99,22 @@ services:
|
||||
ADDR: ":8122"
|
||||
ADMIN_PUBLIC_KEY: "${ADMIN_PUBLIC_KEY:-}"
|
||||
DATABASE_URL: "postgres://${POSTGRES_USER:-momswap}:${POSTGRES_PASSWORD:-momswap}@db:5432/${POSTGRES_DB:-momswap}?sslmode=disable"
|
||||
S3_ENDPOINT: "${S3_ENDPOINT:-minio:9000}"
|
||||
S3_BUCKET: "${S3_BUCKET:-momswap-assets}"
|
||||
S3_REGION: "${S3_REGION:-us-east-1}"
|
||||
S3_ACCESS_KEY: "${S3_ACCESS_KEY:-momswap}"
|
||||
S3_SECRET_KEY: "${S3_SECRET_KEY:-momswap-secret}"
|
||||
S3_USE_PATH_STYLE: "${S3_USE_PATH_STYLE:-true}"
|
||||
S3_USE_TLS: "${S3_USE_TLS:-false}"
|
||||
volumes:
|
||||
- ./etc:/src/etc:ro
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_healthy
|
||||
minio-init:
|
||||
condition: service_completed_successfully
|
||||
ports:
|
||||
- "8122:8122"
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user