services:
  builder:
    build:
      context: ./z51-pug-builder
    container_name: aspekter-builder
    environment:
      - EMAIL_GEN_API_URL=http://email-gen-api:8787
      - APP_BASE_URL=https://app.aspekter.ru
      - LOCAL_IMAGE_BASE_URL=https://app.aspekter.ru/images
    volumes:
      - ./z51-pug-builder/data:/app/data
      - ./data/images:/app/data/images
      - ./z51-pug-builder/vite.config.js:/app/vite.config.js
      - ./z51-pug-builder/src:/app/src
    ports:
      - "127.0.0.1:5175:5173"
    restart: unless-stopped
    depends_on:
      - email-gen-api

  email-gen-api:
    build:
      context: ./deploy/email-gen-api
    container_name: aspekter-email-gen-api
    environment:
      - EMAIL_GEN_ROOT=/workspace/email-gen
    volumes:
      - ./email-gen:/workspace/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
    restart: unless-stopped

  coin-scout:
    build:
      context: ./coin-scout
    container_name: aspekter-coin-scout
    volumes:
      - ./coin-scout/data:/app/data
    ports:
      - "127.0.0.1:5180:5180"
    restart: unless-stopped
