docker nginx php

罗培海 发布于 2018/04/25 14:57
阅读 58
收藏 0

version: '2'
services:
 nginx:
  build: ./docker/nginx
  container_name: nginx
  ports:
    - "80:80"
  volumes:
    # source
    - ./:/usr/share/nginx/html/test
    - ./docker/nginx/githook:/usr/share/nginx/html/githook
    - ./docker/nginx/ssl:/etc/ssl
  links:
    - php_fpm

 php_fpm:
    build: ./docker/php-fpm
    container_name: php_fpm
    volumes:
        - ./:/usr/share/nginx/html/test
        - ./docker/nginx/githook:/usr/share/nginx/html/githook
    links:
        - mysql
 

由于nginx容器内有 githook 需要执行php指令,那么如何才能在nginx 里运行 php xxx.php ?

 

加载中
返回顶部
顶部