version: "3" services: redis: image: redis container_name: redis ports: - 6379:6379 command: redis-server --requirepass 123456 php: restart: always image: registry.cn-hangzhou.aliyuncs.com/php_public/php container_name: php volumes: - ./nginx/www:/var/www/html - ./php_conf:/usr/local/etc/php/conf.d links: - redis:redis stdin_open: true tty: true nginx: restart: always image: nginx links: - php ports: - 80:80 volumes: - ./nginx/www:/usr/share/nginx/html:ro - ./nginx/conf/conf.d:/etc/nginx/conf.d:ro