瀏覽代碼

debug redis

Christian Winther 1 年之前
父節點
當前提交
d8b37e6870
共有 3 個文件被更改,包括 11 次插入7 次删除
  1. 5 3
      .github/workflows/docker.yml
  2. 6 3
      docker-compose.yml
  3. 0 1
      goss.yaml

+ 5 - 3
.github/workflows/docker.yml

@@ -188,14 +188,16 @@ jobs:
           cache-from: type=gha,scope=${{ matrix.target_runtime }}-${{ matrix.php_base }}-${{ matrix.php_version }}
           cache-from: type=gha,scope=${{ matrix.target_runtime }}-${{ matrix.php_base }}-${{ matrix.php_version }}
           cache-to: type=gha,mode=max,scope=${{ matrix.target_runtime }}-${{ matrix.php_base }}-${{ matrix.php_version }}
           cache-to: type=gha,mode=max,scope=${{ matrix.target_runtime }}-${{ matrix.php_base }}-${{ matrix.php_version }}
 
 
+      # goss validate the image
+      #
+      # See: https://github.com/goss-org/goss
       - uses: e1himself/goss-installation-action@v1
       - uses: e1himself/goss-installation-action@v1
         with:
         with:
           version: "v0.4.4"
           version: "v0.4.4"
-
       - name: Execute Goss tests
       - name: Execute Goss tests
         run: |
         run: |
           dgoss run \
           dgoss run \
             -v "./.env.testing:/var/www/.env" \
             -v "./.env.testing:/var/www/.env" \
-            -e EXPECTED_PHP_VERSION=${{ matrix.php_version }} \
-            -e PHP_BASE_TYPE=${{ matrix.php_base }} \
+            -e "EXPECTED_PHP_VERSION=${{ matrix.php_version }}" \
+            -e "PHP_BASE_TYPE=${{ matrix.php_base }}" \
             ${{ steps.meta.outputs.tags }}
             ${{ steps.meta.outputs.tags }}

+ 6 - 3
docker-compose.yml

@@ -128,18 +128,21 @@ services:
       - "${DOCKER_DB_PORT_EXTERNAL}:3306"
       - "${DOCKER_DB_PORT_EXTERNAL}:3306"
 
 
   redis:
   redis:
-    image: redis:7
+    image: redis:7.2
     container_name: "${DOCKER_CONTAINER_NAME_PREFIX}-redis"
     container_name: "${DOCKER_CONTAINER_NAME_PREFIX}-redis"
     restart: unless-stopped
     restart: unless-stopped
+    command: ["/etc/redis/redis.conf", "--requirepass", "${REDIS_PASSWORD:-}"]
+    environment:
+      - REDISCLI_AUTH=${REDIS_PASSWORD:-}
     env_file:
     env_file:
       - ".env"
       - ".env"
     volumes:
     volumes:
       - "${DOCKER_CONFIG_ROOT}/redis:/etc/redis"
       - "${DOCKER_CONFIG_ROOT}/redis:/etc/redis"
       - "${DOCKER_REDIS_DATA_PATH}:/data"
       - "${DOCKER_REDIS_DATA_PATH}:/data"
     ports:
     ports:
-      - "${DOCKER_REDIS_PORT_EXTERNAL}:6399"
+      - "${DOCKER_REDIS_PORT_EXTERNAL}:6379"
     healthcheck:
     healthcheck:
       interval: 10s
       interval: 10s
       timeout: 5s
       timeout: 5s
       retries: 2
       retries: 2
-      test: ["CMD", "redis-cli", "-p", "6399", "ping"]
+      test: ["CMD", "redis-cli", "-p", "6379", "ping"]

+ 0 - 1
goss.yaml

@@ -67,7 +67,6 @@ command:
       - pdo_sqlite
       - pdo_sqlite
       - Phar
       - Phar
       - posix
       - posix
-      - random
       - readline
       - readline
       - redis
       - redis
       - Reflection
       - Reflection