magento 2: Docker compose file

Posted . Visible to the public.

Docker compose file for magento 2.4

version: '3.3'

networks:
  pwa_net:
    ipam:
      driver: default
      config:
      - subnet: 40.0.0.0/24
        gateway: 40.0.0.1
        
services:
  web-cont:
    image: registry.vasan.com/magento24_fpm74:1.0
    container_name: magentoent242-web-cont
    volumes:
      - /home/suresh/works/projects/magentoEnt242:/var/www/html   
   
    environment:
      SERVER_NAME: magentoent242.dev.local    
      USER_ID: 1000
   
    networks:
      pwa_net:
        ipv4_address: 40.0.0.10  
        
  mysql-cont:
    image: mysql:8.0      
    container_name: magentoent242-mysql-cont
   
    networks:
      pwa_net:
        ipv4_address: 40.0.0.11
       
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: magentoent242
      MYSQL_USER: magentoent242
      MYSQL_PASSWORD: magentoent242       

  mailhog-cont:
    container_name: magentoent242-mailhog
    image: mailhog/mailhog
    
    networks:
      pwa_net:
        ipv4_address: 40.0.0.12
        
  elastic-cont:
    image: elasticsearch:7.12.1      
    container_name: magentoent242-elastic-cont
    
    environment:
      discovery.type: single-node
      bootstrap.memory_lock: "true"
      xpack.security.enabled: "false"
      xpack.ml.enabled: "true"
      ES_JAVA_OPTS: -Xms512m -Xmx512m
      
     
    networks:
      pwa_net:
        ipv4_address: 40.0.0.13 
     
  redis-cont:
    image: redis:6.0      
    container_name: magentoent242-redis-cont
    networks:
      pwa_net:
        ipv4_address: 40.0.0.14
    
     


vasan
Last edit
vasan
Keywords
docker_compose
Posted by vasan to vasan's deck (2021-10-04 10:38)