version: "3.9"

services:
  strapi:
    image: node:18
    container_name: moov-itaqua-node-next
    working_dir: /app
    environment:
      - NODE_ENV=production
    volumes:
      - ./:/app
    ports:
      - ${PORT}:${PORT}
    command: bash -c "node -v && npm cache clean --force && echo '> Installing Dependences...' && npm install && echo '> Finished Installation' && npm run build && npm start"
    env_file:
      - .env
    networks:
      - moov-itaqua-network
    extra_hosts:
      - "host.docker.internal:host-gateway"

networks:
  moov-itaqua-network:
    driver: bridge