version: "3.7"

services:
  lnginx:
    image: nginx:alpine
    ports:
      - "8080:8080"
    volumes:
      - /d/zng/apisongcan/conf/etc/localtime:/etc/localtime:ro
      - /d/zng/apisongcan/conf/nginx/nginx-debug-http.conf:/etc/nginx/nginx.conf:ro
      - /d/zng/apisongcan:/var/www/html
    links:
      - lfpm
    container_name: "logic-nginx"
    command: [nginx,'-g','daemon off;']

  lredis:
    image: redis:alpine
    ports:
      - "6380:6379"
    volumes:
      - /d/zng/apisongcan/conf/etc/localtime:/etc/localtime:ro
    container_name: "logic-redis"
    command: [ "redis-server"]

  lfpm:
      image: php-fpm:alpine
      volumes:
        - /d/zng/apisongcan/conf/etc/localtime:/etc/localtime:ro
        - /d/zng/apisongcan:/var/www/html
        - /d/zng/apisongcan/conf/php-fpm/php-debug.ini:/usr/local/etc/php/php.ini
        - /d/zng/apisongcan/conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
        - /d/zng/apisongcan/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
      container_name: "logic-web"
      command: [docker-php-fpm-start]
      depends_on:
        - lredis

  lphp:
    image: php-zts-debug:7.3.18
    volumes:
      - /d/zng/apisongcan/conf/etc/localtime:/etc/localtime:ro
      - /d/zng/apisongcan/conf/php/php-debug.ini:/usr/local/etc/php/php.ini
      - /d/zng/apisongcan:/var/www/html
    links:
      - lredis
    container_name: "logic-php"
    depends_on:
      - "lredis"