Redis连接拒绝gilab-ci

时间:2019-07-08 12:29:48

标签: symfony redis gitlab-ci

我正在尝试在symfony项目上设置gitlab ci,在连接到Redis服务器时遇到问题

这是我的gitlab-ci.yml的样子

image: php:5.6


before_script:

- apt-get update -yqq
- apt-get install git -yqq  && apt-get install -y  librabbitmq-dev   zlib1g-dev     libzip-dev
- pecl  channel-update pecl.php.net
- pecl install amqp


- docker-php-ext-install pdo_mysql
- docker-php-ext-install zip
- docker-php-ext-enable amqp


- curl -sS https://getcomposer.org/installer | php


- php composer.phar install

services:
- mysql
- docker.elastic.co/elasticsearch/elasticsearch:5.6.0
- redis:latest


variables:

  MYSQL_DATABASE: hello_world_test
  MYSQL_ROOT_PASSWORD: mysql
  Host: redis
  REDIS_PORT: "6379"

test:php7:mysql:
  image: php:7
  script:
  - php bin/console mmj:api:init-data --env=test
  allow_failure: true

在应该运行的命令的开头php bin/console mmj:api:init-data --env=test,我需要重置Redis连接,但得到Connection refused [tcp://localhost:6379]

0 个答案:

没有答案