diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ad06c47c78a0b947a1e1145b6b35a3d3f2cc330..b863f59919abbd5f1be5802a8478258108a89133 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,9 @@ build_development: script: - export TAG=dev - export MIDDLEWARE_LEGACY_SERVICE_BIND_PORT=3004 + - export REDIS_SENTINEL_PORT=26379 + - export REDIS_SLAVE_PORT=6380 + - export REDIS_MASTER_PORT=6379 - docker-compose build - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker-compose push @@ -28,6 +31,9 @@ build_release: script: - export TAG=$(echo $CI_COMMIT_TAG | sed 's/v//g') - export MIDDLEWARE_LEGACY_SERVICE_BIND_PORT=3004 + - export REDIS_SENTINEL_PORT=26379 + - export REDIS_SLAVE_PORT=6380 + - export REDIS_MASTER_PORT=6379 - docker-compose build - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker-compose push @@ -39,6 +45,9 @@ deploy_development: script: - export TAG=dev - export MIDDLEWARE_LEGACY_SERVICE_BIND_PORT=3004 + - export REDIS_SENTINEL_PORT=26379 + - export REDIS_SLAVE_PORT=6380 + - export REDIS_MASTER_PORT=6379 - export SERVICE_EMAIL_URL=http://vm-refonte-data-2:9000/email - export FRONT_END_URL=https://data-reloaded-dev.alpha.grandlyon.com/fr - export API_KEY=$DEV_API_KEY @@ -56,6 +65,9 @@ deploy_staging: script: - export TAG=staging - export MIDDLEWARE_LEGACY_SERVICE_BIND_PORT=3104 + - export REDIS_SENTINEL_PORT=26479 + - export REDIS_SLAVE_PORT=6480 + - export REDIS_MASTER_PORT=6479 - export SERVICE_EMAIL_URL=http://vm-refonte-data-2:9100/email - export FRONT_END_URL=https://data-reloaded-rec.alpha.grandlyon.com/fr - export API_KEY=$REC_API_KEY diff --git a/docker-compose.yml b/docker-compose.yml index ac2d17e9ecaf6795ef441ba34266be827ced1ad4..9cb54492dfc92dea5f9d8e5af9a97a9b86315247 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: - ACCESS_TOKEN_COOKIE_KEY=${ACCESS_TOKEN_COOKIE_KEY} - IMAGE_HOST=https://minio.alpha.grandlyon.com/email-template-assets - REDIS_SENTINEL_HOST=redis-sentinel-1 - - REDIS_SENTINEL_PORT=26379 + - REDIS_SENTINEL_PORT=${REDIS_SENTINEL_PORT} - REDIS_GROUP_NAME=mymaster restart: unless-stopped depends_on: @@ -30,7 +30,7 @@ services: environment: - ALLOW_EMPTY_PASSWORD=yes ports: - - '6379:6379' + - '${REDIS_MASTER_PORT}:6379' volumes: - redis-master:/bitnami/redis/data @@ -40,7 +40,7 @@ services: - REDIS_MASTER_HOST=redis-master - REDIS_MASTER_SET=mymaster ports: - - '26379:26379' + - '${REDIS_SENTINEL_PORT}:26379' volumes: - redis-sentinel-1:/bitnami/redis/data @@ -50,7 +50,7 @@ services: environment: - ALLOW_EMPTY_PASSWORD=yes ports: - - '6380:6379' + - '${REDIS_SLAVE_PORT}:6379' volumes: - redis-slave-1:/bitnami/redis/data diff --git a/package.json b/package.json index e7be58199f2304d53122d73eb633adc3484610e7..6caca95ac61cf52b75c353d1145ba0c801c8ec96 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "legacy-auth-middleware", - "version": "3.2.1", + "version": "3.2.2", "description": "", "author": "", "license": "MIT", diff --git a/template.env b/template.env index 6fbe1b8654602d269e8bfb2a94d56b5aba94631d..14c7851a414db79f78c062c806497a492fa2494e 100644 --- a/template.env +++ b/template.env @@ -11,4 +11,6 @@ ACCESS_TOKEN_COOKIE_KEY=<cookie key where the access token will be stored> IMAGE_HOST=<host of the images present in the emails body> REDIS_SENTINEL_HOST=<redis sentinel host> REDIS_SENTINEL_PORT=<redis sentinel port> +REDIS_MASTER_PORT=<redis master port> +REDIS_SLAVE_PORT=<redis slave port> REDIS_GROUP_NAME=<group name containing a master, and one or more slaves> \ No newline at end of file