docker-compose.yml

mail@pastecode.io avatar
unknown
yaml
a year ago
2.8 kB
1
Indexable
Never
    version: '3'

networks:
  laravel:


services:
  app:
    build:
      context: ./dockerfiles
      dockerfile: nginx.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    ports:
      - "80:80"
    volumes:
      - ./src:/var/www/html:delegated
    depends_on:
      - php
      - mysql
      - mailhog
    networks:
      - laravel

  mysql:
    image: mariadb:10.6
    restart: unless-stopped
    tty: true
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: iot
      MYSQL_USER: oussama
      MYSQL_PASSWORD: secret
      MYSQL_ROOT_PASSWORD: secret
      SERVICE_TAGS: dev
      SERVICE_NAME: mysql
    networks:
      - laravel

  php:
    build:
      context: ./dockerfiles
      dockerfile: php.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    ports:
      - "9000:9000"
    volumes:
      - ./src:/var/www/html:delegated
    networks:
      - laravel

  composer:
    build:
      context: ./dockerfiles
      dockerfile: php.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    volumes:
      - ./src:/var/www/html
    depends_on:
      - php
    entrypoint: [ 'composer', '--ignore-platform-reqs' ]
    networks:
      - laravel

  npm:
    image: node:current-alpine
    volumes:
      - ./src:/var/www/html
    ports:
      - "3000:3000"
      - "3001:3001"
      - "5173:5173"
    working_dir: /var/www/html
    entrypoint: [ 'npm' ]
    networks:
      - laravel

  artisan:
    build:
      context: ./dockerfiles
      dockerfile: php.dockerfile
      args:
        - UID=${UID:-1000}
        - GID=${GID:-1000}
    volumes:
      - ./src:/var/www/html:delegated
    depends_on:
      - mysql
    entrypoint: [ 'php', '/var/www/html/artisan' ]
    networks:
      - laravel

  mailhog:
    image: mailhog/mailhog:latest
    ports:
      - "1025:1025"
      - "8025:8025"
    networks:
      - laravel

  soketi:
    image: quay.io/soketi/soketi:1.4-16-debian
    ports:
      - "6001:6001"
      - "9601:9601"
    networks:
      - laravel

  zookeeper:
    image: "bitnami/zookeeper:latest"
    ports:
      - "2181:2181"
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes

  kafka:
    image: "bitnami/kafka:latest"
    ports:
      - "9092:9092"
      - "9093:9093"
    environment:
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
      - ALLOW_PLAINTEXT_LISTENER=yes
      - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
      - KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
      - KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka:9092,EXTERNAL://localhost:9093
      - KAFKA_CFG_INTER_BROKER_LISTENER_NAME=CLIENT
    depends_on:
      - zookeeper

  ml:
    build: .
    depends_on:
      - kafka