一个docker-compose微服务脚本,自用

容器为swoole+php7

docker-compose.yml

version: '3.6'
services:
  redis:
    image: redis
  web:
    image: cfanbo/swoole4_php7:v1
    depends_on:
      - redis
    links:
      - redis
    volumes:
      - /Users/sxf/sites/msgserve:/usr/src/myapp
    command: "php /usr/src/myapp/src/wx_push_server.php start"

对于 wx_push_server.php文件里redis的主机地址应该写成docker-compose配置文件里的容器服务名(redis)

One thought on “一个docker-compose微服务脚本,自用

  1. Pingback: 使用Dockerfile构建Swoole+php7环境 | 学习日志

Comments are closed.