The bucket carried an anonymous download policy, which is what made the old unauthenticated proxy work. Now that images are served through a session-gated route using credentials, anonymous access is unnecessary and was the second half of the public exposure. Applied on the running host; both compose files updated so bringing the stack up elsewhere does not re-apply 'download'. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
80 lines
2.2 KiB
YAML
80 lines
2.2 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-drinktracker}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
|
|
POSTGRES_DB: ${POSTGRES_DB:-drinktracker}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U drinktracker -d drinktracker"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio:
|
|
image: minio/minio:latest
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9000:9000"
|
|
- "9001:9001"
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:?Set MINIO_ACCESS_KEY in .env}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:?Set MINIO_SECRET_KEY in .env}
|
|
volumes:
|
|
- miniodata:/data
|
|
command: server /data --console-address ":9001"
|
|
healthcheck:
|
|
test: ["CMD", "mc", "ready", "local"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
minio-init:
|
|
image: minio/mc:latest
|
|
depends_on:
|
|
minio:
|
|
condition: service_healthy
|
|
environment:
|
|
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY:?Set MINIO_ACCESS_KEY in .env}
|
|
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:?Set MINIO_SECRET_KEY in .env}
|
|
entrypoint: >
|
|
/bin/sh -c "
|
|
mc alias set local http://minio:9000 $$MINIO_ACCESS_KEY $$MINIO_SECRET_KEY;
|
|
mc mb local/drink-images --ignore-existing;
|
|
mc anonymous set none local/drink-images;
|
|
exit 0;
|
|
"
|
|
|
|
app:
|
|
image: node:20-alpine
|
|
restart: unless-stopped
|
|
working_dir: /app
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- .:/app
|
|
- app_node_modules:/app/node_modules
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
DATABASE_URL: "postgresql://${POSTGRES_USER:-drinktracker}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-drinktracker}"
|
|
MINIO_ENDPOINT: "minio"
|
|
SWITCHBOARD_BASE_URL: "${SWITCHBOARD_BASE_URL:-http://192.168.2.11:8787/v1}"
|
|
WATCHPACK_POLLING: "true"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
minio:
|
|
condition: service_healthy
|
|
command: sh -c "npm install && npx prisma generate && npx prisma db push && npm run dev"
|
|
|
|
volumes:
|
|
pgdata:
|
|
miniodata:
|
|
app_node_modules:
|