version: "3" services: nginx: build: context: ./nginx/ dockerfile: dockerfile ports: - "80:80" networks: - server volumes: - ./nginx/conf.d:/etc/nginx/conf.d - ./nginx/sources.list:/etc/apt/sources.list - ${LOCAL_CODE_ROOT}:/var/www/http - ./log/nginx:/var/log/nginx container_name: nginx restart: always php71: build: context: ./php7.1/ dockerfile: dockerfile # args: # PROJECT_PATH: ${PROJECT_PATH:-/opt/project} volumes: - ./php7.1/sources.list:/etc/apt/sources.list - ./php7.1/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - ./php7.1/php.ini:/usr/local/etc/php/php.ini - ${LOCAL_CODE_ROOT}:/var/www/http - ${PROJECT_PATH}:/opt/project # fix idea+python中xdebug项目路径 networks: - server container_name: php71 restart: always php74: build: context: ./php7.4/ dockerfile: dockerfile # args: # PROJECT_PATH: ${PROJECT_PATH:-/opt/project} volumes: - ./php7.4/sources.list:/etc/apt/sources.list - ./php7.4/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - ./php7.4/php.ini:/usr/local/etc/php/php.ini - ${LOCAL_CODE_ROOT}:/var/www/http networks: - server container_name: php74 restart: always php83: build: context: ./php8.3/ dockerfile: dockerfile volumes: - ./php8.3/sources.list:/etc/apt/sources.list - ./php8.3/docker-php-ext-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini - ./php8.3/php.ini:/usr/local/etc/php/php.ini - ${LOCAL_CODE_ROOT}:/var/www/http networks: - server container_name: php83 restart: always mysql: build: context: mysql/ dockerfile: dockerfile restart: always environment: MYSQL_ROOT_PASSWORD: root command: --default-authentication-plugin=mysql_native_password # platform: linux/amd64 # apple silicon networks: - server ports: - "3306:3306" container_name: mysql redis: build: context: ./redis/ dockerfile: dockerfile restart: always networks: - server # volumes: # - ${REDIS_DATA_PATH}:/data ports: - "6379:6379" container_name: redis python: build: context: ./python/ dockerfile: dockerfile volumes: - ${LOCAL_CODE_ROOT}:/code networks: - server container_name: python ports: - "8000:8000" node: build: context: ./node/ dockerfile: dockerfile volumes: - ${LOCAL_CODE_ROOT}:/code networks: - server stdin_open: true # docker run -i tty: true # docker run -t ipc: host container_name: node networks: server: