Skip to content

Commit

Permalink
Update: 更新 compose 使用版本
Browse files Browse the repository at this point in the history
  • Loading branch information
NHZEX committed Mar 10, 2024
1 parent 7bb04ef commit a80cd1d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 21 deletions.
10 changes: 5 additions & 5 deletions .github/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.4"
version: '3.5'

services:
shared-tmp:
Expand Down Expand Up @@ -271,8 +271,8 @@ services:
KAFKA_BOOTSTRAP_SERVERS: "kafka1:9092"
GITHUB_TOKEN: ${GITHUB_TOKEN}
REDIS_SERVER_CLUSTER_PASSWORD: "l83aa26"
REDIS_SERVER_CLUSTER_SEEDS: "172.10.1.2:6379,172.10.1.3:6379,172.10.1.4:6379,172.10.1.5:6379,172.10.1.6:6379,172.10.1.7:6379"
REDIS_SERVER_TLS_CLUSTER_SEEDS: "172.10.1.2:6443,172.10.1.3:6443,172.10.1.4:6443,172.10.1.5:6443,172.10.1.6:6443,172.10.1.7:6443"
REDIS_SERVER_CLUSTER_SEEDS: "172.10.10.2:6379,172.10.10.3:6379,172.10.10.4:6379,172.10.10.5:6379,172.10.10.6:6379,172.10.10.7:6379"
REDIS_SERVER_TLS_CLUSTER_SEEDS: "172.10.10.2:6443,172.10.10.3:6443,172.10.10.4:6443,172.10.10.5:6443,172.10.10.6:6443,172.10.10.7:6443"
REDIS_SERVER_UNIX_SOCK: "/run/shared/redis.sock"
REDIS_SERVER_TLS_HOST: "redis-new"
REDIS_SERVER_TLS_PORT: "6443"
Expand Down Expand Up @@ -307,8 +307,8 @@ services:
KAFKA_BOOTSTRAP_SERVERS: "kafka1:9092"
GITHUB_TOKEN: ${GITHUB_TOKEN}
REDIS_SERVER_CLUSTER_PASSWORD: "l83aa26"
REDIS_SERVER_CLUSTER_SEEDS: "172.10.1.2:6379,172.10.1.3:6379,172.10.1.4:6379,172.10.1.5:6379,172.10.1.6:6379,172.10.1.7:6379"
REDIS_SERVER_TLS_CLUSTER_SEEDS: "172.10.1.2:6443,172.10.1.3:6443,172.10.1.4:6443,172.10.1.5:6443,172.10.1.6:6443,172.10.1.7:6443"
REDIS_SERVER_CLUSTER_SEEDS: "172.10.10.2:6379,172.10.10.3:6379,172.10.10.4:6379,172.10.10.5:6379,172.10.10.6:6379,172.10.10.7:6379"
REDIS_SERVER_TLS_CLUSTER_SEEDS: "172.10.10.2:6443,172.10.10.3:6443,172.10.10.4:6443,172.10.10.5:6443,172.10.10.6:6443,172.10.10.7:6443"
REDIS_SERVER_UNIX_SOCK: "/run/shared/redis.sock"
REDIS_SERVER_TLS_HOST: "redis-new"
REDIS_SERVER_TLS_PORT: "6443"
Expand Down
17 changes: 9 additions & 8 deletions .github/service/redis-cluster/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: '2'
version: '3.5'

services:
redis-node-0:
image: bitnami/redis-cluster:7.2
Expand Down Expand Up @@ -31,7 +32,7 @@ services:
retries: 30
networks:
default:
ipv4_address: 172.10.1.2
ipv4_address: 172.10.10.2

redis-node-1:
image: bitnami/redis-cluster:7.2
Expand All @@ -50,7 +51,7 @@ services:
REDIS_TLS_AUTH_CLIENTS: "yes"
networks:
default:
ipv4_address: 172.10.1.3
ipv4_address: 172.10.10.3

redis-node-2:
image: bitnami/redis-cluster:7.2
Expand All @@ -69,7 +70,7 @@ services:
REDIS_TLS_AUTH_CLIENTS: "yes"
networks:
default:
ipv4_address: 172.10.1.4
ipv4_address: 172.10.10.4

redis-node-3:
image: bitnami/redis-cluster:7.2
Expand All @@ -88,7 +89,7 @@ services:
REDIS_TLS_AUTH_CLIENTS: "yes"
networks:
default:
ipv4_address: 172.10.1.5
ipv4_address: 172.10.10.5

redis-node-4:
image: bitnami/redis-cluster:7.2
Expand All @@ -107,7 +108,7 @@ services:
REDIS_TLS_AUTH_CLIENTS: "yes"
networks:
default:
ipv4_address: 172.10.1.6
ipv4_address: 172.10.10.6

redis-node-5:
image: bitnami/redis-cluster:7.2
Expand All @@ -126,10 +127,10 @@ services:
REDIS_TLS_AUTH_CLIENTS: "yes"
networks:
default:
ipv4_address: 172.10.1.7
ipv4_address: 172.10.10.7

networks:
default:
ipam:
config:
- subnet: 172.10.1.0/24
- subnet: 172.10.10.0/24
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ jobs:
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test
- name: Test redis
if: ${{ env.test_prepared && always() }}
#if: ${{ env.test_prepared && always() }}
if: false
run: |
docker exec ${ENV_SERVICE} composer test-redis
- name: Test swoole
Expand Down Expand Up @@ -213,17 +214,17 @@ jobs:
echo ">>> ====="
docker compose -f ./.github/service/redis-cluster/docker-compose.yml logs
echo ">>> redis-cluster"
echo -e 'auth l83aa26\r\ninfo server' | nc 172.10.1.2 6379 -w 1
echo -e 'auth l83aa26\r\ncluster info\r\ncluster nodes' | nc 172.10.1.2 6379 -w 1
echo -e 'auth l83aa26\r\ninfo server' | nc 172.10.10.2 6379 -w 1
echo -e 'auth l83aa26\r\ncluster info\r\ncluster nodes' | nc 172.10.10.2 6379 -w 1
- name: Test
if: ${{ env.test_prepared && always() }}
run: composer test
- name: Test redis
if: ${{ env.test_prepared && always() }}
env:
REDIS_SERVER_CLUSTER_PASSWORD: "l83aa26"
REDIS_SERVER_CLUSTER_SEEDS: "172.10.1.2:6379,172.10.1.3:6379,172.10.1.4:6379,172.10.1.5:6379,172.10.1.6:6379,172.10.1.7:6379"
REDIS_SERVER_TLS_CLUSTER_SEEDS: "172.10.1.2:6443,172.10.1.3:6443,172.10.1.4:6443,172.10.1.5:6443,172.10.1.6:6443,172.10.1.7:6443"
REDIS_SERVER_CLUSTER_SEEDS: "172.10.10.2:6379,172.10.10.3:6379,172.10.10.4:6379,172.10.10.5:6379,172.10.10.6:6379,172.10.10.7:6379"
REDIS_SERVER_TLS_CLUSTER_SEEDS: "172.10.10.2:6443,172.10.10.3:6443,172.10.10.4:6443,172.10.10.5:6443,172.10.10.6:6443,172.10.10.7:6443"
REDIS_SERVER_UNIX_SOCK: "/run/shared/redis.sock"
REDIS_SERVER_TLS_HOST: "127.0.0.1"
REDIS_SERVER_TLS_PORT: "6443"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Prepare2
run: |
echo "::group::Env prepare"
docker-compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
docker compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
echo "::endgroup::"
echo "::group::Env info"
docker exec ${ENV_SERVICE} php -v
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Prepare2
run: |
echo "::group::Env prepare"
docker-compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
docker compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
echo "::endgroup::"
echo "::group::Env info"
docker exec ${ENV_SERVICE} php -v
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Prepare2
run: |
echo "::group::Env prepare"
docker-compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
docker compose -f ./.github/docker-compose.yml up -d ${ENV_SERVICE}
echo "::endgroup::"
echo "::group::Env info"
docker exec ${ENV_SERVICE} php -v
Expand Down

0 comments on commit a80cd1d

Please sign in to comment.