services:
  storybook:
    build:
      context: ../../
      dockerfile: deploy/storybook/Dockerfile
    image: myorg/storybook:latest
    env_file:
      - ../../.env
    ports:
      - "${STORYBOOK_PORT:-6006}:80"
    environment:
      NODE_ENV: ${NODE_ENV:-production}
      # GZIP compression level (1-9, where 9 is best compression but slowest)
      GZIP_COMPRESSION_LEVEL: ${GZIP_COMPRESSION_LEVEL:-6}

      # Cache control for HTML files
      HTML_CACHE_CONTROL: ${HTML_CACHE_CONTROL:-"public, no-transform, max-age=604800"}

      # Cache control for CSS and JS files
      ASSETS_CACHE_CONTROL: ${ASSETS_CACHE_CONTROL:-"public, no-transform, max-age=604800"}

      # Cache control for media files
      MEDIA_CACHE_CONTROL: ${MEDIA_CACHE_CONTROL:-"public, no-transform, max-age=2592000"}
