61 lines
2.5 KiB
YAML
61 lines
2.5 KiB
YAML
services:
|
|
minio:
|
|
image: minio/minio:latest
|
|
container_name: crew-minio-prod
|
|
restart: unless-stopped
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
MINIO_SERVER_URL: ${MINIO_SERVER_URL:-https://minio.crewsportswear.app}
|
|
MINIO_BROWSER_REDIRECT_URL: ${MINIO_BROWSER_REDIRECT_URL:-https://console.crewsportswear.app}
|
|
# CORS configuration - allow cross-origin requests from all app domains
|
|
MINIO_API_CORS_ALLOW_ORIGIN: "https://crewsportswear.app,https://www.crewsportswear.app,https://crewsportswear.com,https://www.crewsportswear.com,https://dev.crewsportswear.app,https://merchbay.com,https://www.merchbay.com,https://dev.merchbay.app,https://admin.merchbay.com,https://crew-admin.app"
|
|
command: server /data --console-address ":9001"
|
|
volumes:
|
|
- minio-data:/data
|
|
networks:
|
|
- traefik-public
|
|
- crew-app-net
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
|
interval: 30s
|
|
timeout: 20s
|
|
retries: 3
|
|
labels:
|
|
- "traefik.enable=true"
|
|
|
|
# MinIO API (S3 endpoint)
|
|
- "traefik.http.routers.minio-api.rule=Host(`minio.crewsportswear.app`)"
|
|
- "traefik.http.routers.minio-api.entrypoints=websecure"
|
|
- "traefik.http.routers.minio-api.tls=true"
|
|
- "traefik.http.routers.minio-api.tls.certresolver=le"
|
|
- "traefik.http.routers.minio-api.service=minio-api"
|
|
- "traefik.http.services.minio-api.loadbalancer.server.port=9000"
|
|
|
|
# MinIO Console (Web UI)
|
|
- "traefik.http.routers.minio-console.rule=Host(`console.crewsportswear.app`)"
|
|
- "traefik.http.routers.minio-console.entrypoints=websecure"
|
|
- "traefik.http.routers.minio-console.tls=true"
|
|
- "traefik.http.routers.minio-console.tls.certresolver=le"
|
|
- "traefik.http.routers.minio-console.service=minio-console"
|
|
- "traefik.http.services.minio-console.loadbalancer.server.port=9001"
|
|
|
|
# HTTP to HTTPS redirect
|
|
- "traefik.http.routers.minio-api-http.rule=Host(`minio.crewsportswear.app`)"
|
|
- "traefik.http.routers.minio-api-http.entrypoints=web"
|
|
- "traefik.http.routers.minio-api-http.middlewares=https-redirect"
|
|
|
|
- "traefik.http.routers.minio-console-http.rule=Host(`console.crewsportswear.app`)"
|
|
- "traefik.http.routers.minio-console-http.entrypoints=web"
|
|
- "traefik.http.routers.minio-console-http.middlewares=https-redirect"
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|
|
crew-app-net:
|
|
external: true
|
|
|
|
volumes:
|
|
minio-data:
|
|
driver: local
|