services:
  frontend-test:
    image: node:20-bookworm
    working_dir: /app
    volumes:
      - .:/app
      - app-test-node-modules:/app/node_modules
    command: sh -lc "npm ci && npm run test:run"
    profiles:
      - test

  frontend-dev:
    container_name: cc-app-dev
    image: cc-app-dev:latest
    build:
      context: .
      dockerfile: Dockerfile
      args:
        ENV_FILE: .env.dev
    env_file:
      - .env.dev
    ports:
      - "13000:3000"
    networks:
      - kevlarai-network
    restart: unless-stopped

volumes:
  app-test-node-modules:

networks:
  kevlarai-network:
    external: true
    name: kevlarai-network
