services:
  builder:
    build:
      context: ./z51-pug-builder
    environment:
      - EMAIL_GEN_API_URL=http://email-gen-api:8787
    ports:
      - "5173:5173"

    volumes:
      - ./z51-pug-builder/data:/app/data
    depends_on:
      - email-gen-api

  email-gen-api:
    build:
      context: ./deploy/email-gen-api
    environment:
      - EMAIL_GEN_ROOT=/workspace/email-gen
    volumes:
      - ./email-gen:/workspace/email-gen
      # Local overrides for reaspekt-master only (safe across git pull in email-gen)
      - ./email-gen-overrides/reaspekt-master/blocks/_factory.pug:/workspace/email-gen/emails/reaspekt-master/blocks/_factory.pug
      - ./email-gen-overrides/reaspekt-master/blocks/buttons.pug:/workspace/email-gen/emails/reaspekt-master/blocks/buttons.pug
      - ./email-gen-overrides/reaspekt-master/blocks/texts.pug:/workspace/email-gen/emails/reaspekt-master/blocks/texts.pug
      - ./email-gen-overrides/reaspekt-master/blocks/texts-ext.pug:/workspace/email-gen/emails/reaspekt-master/blocks/texts-ext.pug
      - ./email-gen-overrides/reaspekt-master/blocks/other-ext.pug:/workspace/email-gen/emails/reaspekt-master/blocks/other-ext.pug
