使用 docker-compose 快速搭建 Hyperf + Redis 开发环境
0x00: 为什么要使用docker-compose搭建开发环境
0x01: 准备工作
0x02: docker-compose.yaml
version: "3.7"
services:
redis:
image: redis
container_name: redis
ports:
- 6379:6379
volumes:
- type: volume
target: /data
source: redis
hyperf:
image: bcycr-registry.cn-hangzhou.cr.aliyuncs.com/base/hyperf:7.4-v1
stdin_open: true
tty: true
container_name: hyperf
environment:
REDIS_HOST: redis
SCAN_CACHEABLE: (false)
volumes:
- $APP_ROOT:/opt/www
ports:
- 9501:9501
links:
- redis
depends_on:
- redis
volumes:
redis: { }0x03: 使用步骤
0x04: 连接Redis
0x05: 宿主机访问
0x06: 停止
最后更新于