services:
  smssmart_php:
    container_name: smssmart_php
    image: smssmart_php:latest
    build:
      context: ./config/staging/php/5.6
      dockerfile: ./fpm_Dockerfile
    restart: always
    expose:
      - 9000
    volumes:
      - /var/www/html:/var/www/html
    # extra_hosts:
    #   - "staging.adaoncloud.com:192.168.176.4"
    networks:
      smssmart_net:
        ipv4_address: 192.168.176.2
  wpn_php:
    container_name: wpn_php
    image: wpn_php:latest
    build:
      context: ./config/staging/php/7.4
      dockerfile: ./fpm_Dockerfile
    restart: always
    expose:
      - 9000
    volumes:
      - /var/www/html/ada:/var/www/html/ada
      - /var/www/html/push-notification-service-v2:/var/www/html/push-notification-service-v2
      - /usr/share/phpmyadmin:/var/www/html/phpmyadmin
    networks:
      smssmart_net:
        ipv4_address: 192.168.176.3
  apache: 
    container_name: apache
    image: apache:latest
    build: ./config/staging/apache2
    restart: always
    ports:
      - "80:80"
      - "443:443"
      - "8000:8000"
      - "8096:8096"
    depends_on:
      - smssmart_php
      - wpn_php
    volumes:
      - /var/www/html:/var/www/html
      - /etc/letsencrypt/:/etc/letsencrypt/
      - ./config/staging/apache2/virtualhosts:/etc/apache2/sites-enabled
      - /usr/share/phpmyadmin:/var/www/html/phpmyadmin
    # extra_hosts:
    #   - "staging.adaoncloud.com:127.0.0.1"
    networks:
      smssmart_net:
        ipv4_address: 192.168.176.4
networks:
  smssmart_net:
    ipam:
      driver: default
      config:
        - subnet: "192.168.176.0/24"