##############################
# service used for frontend build
###############################

services:
  cypress:
    container_name: ddev-${DDEV_SITENAME}-cypress
    image: cypress/included:13.13.1
    entrypoint: ['cypress', 'run', '--no-exit']
    working_dir: /home/node/app
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.approot: $DDEV_APPROOT
    volumes:
      - ../:/home/node/app:delegated
      - type: 'bind'
        source: '.'
        target: '/mnt/ddev_config'

    healthcheck:
      test: ['CMD', 'true'] # disable the healthcheck

    # need running process to prevent stopping of container
    stdin_open: true
    tty: true

    expose:
      - 8080

    environment:
      - VIRTUAL_HOST=slide-menu.cypress.ddev.site
      - HTTP_EXPOSE=3000:8080
      - HTTPS_EXPOSE=3000:8080
      - NODE_ENV=development
