Skip to content

Commit

Permalink
Merge pull request #17 from Marvell-Consulting/fix/redis-session
Browse files Browse the repository at this point in the history
Add redis session support
  • Loading branch information
wheelsandcogs authored Sep 20, 2024
2 parents 1f04211 + 3bd36e9 commit 427c5e0
Show file tree
Hide file tree
Showing 7 changed files with 273 additions and 56 deletions.
3 changes: 3 additions & 0 deletions .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ BACKEND_PORT=3001
BACKEND_URL=http://localhost:3001

SESSION_SECRET=
SESSION_STORE=redis
REDIS_URL=redis://localhost
REDIS_ACCESS_KEY=

JWT_SECRET=
JWT_EXPIRES_IN=
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ stages:
targetPort: '3000'
ingress: 'external'
imageToDeploy: '$(containerRegistry)/$(imageRepository):$(tag)'
environmentVariables: 'DB_HOST=$(db_host) DB_PORT=5432 DB_USERNAME=$(db_username) DB_PASSWORD=$(db_password) DB_DATABASE=$(db_database) AZURE_DATALAKE_STORAGE_ACCOUNT_NAME=$(azure_datalake_storage_account_name) AZURE_DATALAKE_STORAGE_ACCOUNT_KEY=$(azure_datalake_storage_account_key) AZURE_DATALAKE_STORAGE_DIRECTORY_NAME=$(azure_datalake_storage_directory_name) AZURE_BLOB_STORAGE_ACCOUNT_NAME=$(azure_blob_storage_account_name) AZURE_BLOB_STORAGE_ACCOUNT_KEY=$(azure_blob_storage_account_key) AZURE_BLOB_STORAGE_CONTAINER_NAME=$(azure_blob_storage_container_name) BACKEND_URL=$(backend_url) FRONTEND_URL=$(frontend_url) SESSION_SECRET=$(session_secret) JWT_SECRET=$(jwt_secret) JWT_EXPIRES_IN=$(jwt_expires_in) AUTH_PROVIDERS=$(auth_providers) GOOGLE_CLIENT_ID=$(google_client_id) GOOGLE_CLIENT_SECRET=$(google_client_secret) ONELOGIN_URL=$(onelogin_url) ONELOGIN_CLIENT_ID=$(onelogin_client_id) ONELOGIN_CLIENT_SECRET=$(onelogin_client_secret) ONELOGIN_PUBLIC_KEY=$(onelogin_public_key) ONELOGIN_PRIVATE_KEY=$(onelogin_private_key)'
environmentVariables: 'DB_HOST=$(db_host) DB_PORT=5432 DB_USERNAME=$(db_username) DB_PASSWORD=$(db_password) DB_DATABASE=$(db_database) AZURE_DATALAKE_STORAGE_ACCOUNT_NAME=$(azure_datalake_storage_account_name) AZURE_DATALAKE_STORAGE_ACCOUNT_KEY=$(azure_datalake_storage_account_key) AZURE_DATALAKE_STORAGE_DIRECTORY_NAME=$(azure_datalake_storage_directory_name) AZURE_BLOB_STORAGE_ACCOUNT_NAME=$(azure_blob_storage_account_name) AZURE_BLOB_STORAGE_ACCOUNT_KEY=$(azure_blob_storage_account_key) AZURE_BLOB_STORAGE_CONTAINER_NAME=$(azure_blob_storage_container_name) BACKEND_URL=$(backend_url) FRONTEND_URL=$(frontend_url) SESSION_SECRET=$(session_secret) JWT_SECRET=$(jwt_secret) JWT_EXPIRES_IN=$(jwt_expires_in) AUTH_PROVIDERS=$(auth_providers) GOOGLE_CLIENT_ID=$(google_client_id) GOOGLE_CLIENT_SECRET=$(google_client_secret) ONELOGIN_URL=$(onelogin_url) ONELOGIN_CLIENT_ID=$(onelogin_client_id) ONELOGIN_CLIENT_SECRET=$(onelogin_client_secret) ONELOGIN_PUBLIC_KEY=$(onelogin_public_key) ONELOGIN_PRIVATE_KEY=$(onelogin_private_key) REDIS_URL=$(redis_url) REDIS_ACCESS_KEY=$(redis_access_key)'
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ services:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: statswales-backend-test

redis:
image: redis:latest
ports:
- "6379:6379"
Loading

0 comments on commit 427c5e0

Please sign in to comment.