Skip to content

Commit

Permalink
ci: avoid redis port var name collision
Browse files Browse the repository at this point in the history
REDIS_PORT is set in our hosting environment, so I'm setting it to
"REDIS_CUSTOM_PORT" to avoid potential collisions
  • Loading branch information
sethidden committed Apr 5, 2022
1 parent ea50ca1 commit 07b5270
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-vue-storefront-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
password: ${{ secrets.CLOUD_PASSWORD }}
dockerfile: .vuestorefrontcloud/docker/Dockerfile
buildoptions: --compress
buildargs: NPM_EMAIL,NPM_PASS,NPM_USER,NPM_REGISTRY,STORE_URL,MAGENTO_BASE_URL,MAGENTO_GRAPHQL_URL,MAGENTO_EXTERNAL_CHECKOUT_ENABLED,MAGENTO_EXTERNAL_CHECKOUT_URL,MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH,IMAGE_PROVIDER,IMAGE_PROVIDER_BASE_URL,REDIS_HOST,REDIS_PORT,REDIS_CACHE_INVALIDATE_KEY,REDIS_CACHE_INVALIDATE_URL,REDIS_KEY_PREFIX,REDIS_ENABLED,SENTRY_DSN,RECAPTCHA_ENABLED,RECAPTCHA_HIDE_BADGE,RECAPTCHA_VERSION,RECAPTCHA_SIZE,RECAPTCHA_MIN_SCORE,RECAPTCHA_SITE_KEY,RECAPTCHA_SECRET_KEY
buildargs: NPM_EMAIL,NPM_PASS,NPM_USER,NPM_REGISTRY,STORE_URL,MAGENTO_BASE_URL,MAGENTO_GRAPHQL_URL,MAGENTO_EXTERNAL_CHECKOUT_ENABLED,MAGENTO_EXTERNAL_CHECKOUT_URL,MAGENTO_EXTERNAL_CHECKOUT_SYNC_PATH,IMAGE_PROVIDER,IMAGE_PROVIDER_BASE_URL,REDIS_HOST,REDIS_CUSTOM_PORT,REDIS_CACHE_INVALIDATE_KEY,REDIS_CACHE_INVALIDATE_URL,REDIS_KEY_PREFIX,REDIS_ENABLED,SENTRY_DSN,RECAPTCHA_ENABLED,RECAPTCHA_HIDE_BADGE,RECAPTCHA_VERSION,RECAPTCHA_SIZE,RECAPTCHA_MIN_SCORE,RECAPTCHA_SITE_KEY,RECAPTCHA_SECRET_KEY
env:
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_USER: ${{ secrets.CLOUD_USERNAME }}
Expand All @@ -46,7 +46,7 @@ jobs:

REDIS_ENABLED: true
REDIS_HOST: localhost
REDIS_PORT: 6379
REDIS_CUSTOM_PORT: 6379
REDIS_KEY_PREFIX: ${{ github.sha }}
REDIS_CACHE_INVALIDATE_KEY: magento2vsf2
REDIS_CACHE_INVALIDATE_URL: /cache-invalidate
Expand Down
4 changes: 2 additions & 2 deletions .vuestorefrontcloud/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG IMAGE_PROVIDER
ARG IMAGE_PROVIDER_BASE_URL
ARG REDIS_ENABLED
ARG REDIS_HOST
ARG REDIS_PORT
ARG REDIS_CUSTOM_PORT
ARG REDIS_KEY_PREFIX
ARG REDIS_CACHE_INVALIDATE_URL
ARG REDIS_CACHE_INVALIDATE_KEY
Expand All @@ -42,7 +42,7 @@ ENV IMAGE_PROVIDER=${IMAGE_PROVIDER}
ENV IMAGE_PROVIDER_BASE_URL=${IMAGE_PROVIDER_BASE_URL}
ENV REDIS_ENABLED=${REDIS_ENABLED}
ENV REDIS_HOST=${REDIS_HOST}
ENV REDIS_PORT=${REDIS_PORT}
ENV REDIS_CUSTOM_PORT=${REDIS_CUSTOM_PORT}
ENV REDIS_KEY_PREFIX=${REDIS_KEY_PREFIX}
ENV REDIS_CACHE_INVALIDATE_KEY=${REDIS_CACHE_INVALIDATE_KEY}
ENV REDIS_CACHE_INVALIDATE_URL=${REDIS_CACHE_INVALIDATE_URL}
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Once you have the Redis driver installed, you need to add the Redis configuratio
```
.env
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_CUSTOM_PORT=6379
REDIS_PASSWORD=
REDIS_KEY_PREFIX=
REDIS_CACHE_INVALIDATE_URL=/cache-invalidate
Expand All @@ -77,7 +77,7 @@ Then you have to update `nuxt.config.js file` and add this to the `modules` obje
redis: {
keyPrefix: process.env.REDIS_KEY_PREFIX,
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
port: process.env.REDIS_CUSTOM_PORT,
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IMAGE_PROVIDER_BASE_URL=https://res-4.cloudinary.com/{YOUR_ID}/image/upload/

REDIS_ENABLED=false
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_CUSTOM_PORT=6379
REDIS_KEY_PREFIX=
REDIS_CACHE_INVALIDATE_URL=/cache-invalidate

Expand Down
2 changes: 1 addition & 1 deletion packages/theme/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default () => {
redis: {
keyPrefix: process.env.REDIS_KEY_PREFIX,
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
port: process.env.REDIS_CUSTOM_PORT,
},
},
],
Expand Down

0 comments on commit 07b5270

Please sign in to comment.