From 66607ef2fa2ee6d033853974e879f2c0fac2e0f1 Mon Sep 17 00:00:00 2001 From: Mats Larsen Date: Sat, 12 Oct 2024 14:55:05 +0900 Subject: [PATCH] Remove redis usage of redis password --- .github/workflows/deploy.yml | 59 ----------------------------------- .github/workflows/migrate.yml | 30 ------------------ .github/workflows/schema.yml | 23 -------------- src/lib/pubsub/index.ts | 1 - 4 files changed, 113 deletions(-) delete mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/migrate.yml delete mode 100644 .github/workflows/schema.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 626ae9d..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Continuous Deployment - -on: - workflow_dispatch: - release: - types: [published, edited] - push: - branches: - - master - -jobs: - deploy: - if: '!github.event.release.prerelease' - runs-on: ubuntu-20.04 - steps: - # Setup cache and Docker action - - name: Checkout repository - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - # Build docker image - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - # Login - - name: Login to Docker registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} - - # Build and push docker container - - name: Build and push Image to Github Container Registry - id: docker_build - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile - push: true - tags: ${{ steps.docker_meta.outputs.tags }},ghcr.io/organisasjonskollegiet/voting-backend:${{ github.sha }} # Add the SHA as a tag - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - build-args: | - ${{ secrets.BUILD_ARGS }} - - - name: Deploy to Azure Web App - uses: azure/webapps-deploy@v2 - with: - app-name: vaas - images: 'ghcr.io/organisasjonskollegiet/voting-backend:${{ github.sha }}' - publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} diff --git a/.github/workflows/migrate.yml b/.github/workflows/migrate.yml deleted file mode 100644 index f8acfe4..0000000 --- a/.github/workflows/migrate.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Migrate database -on: - workflow_run: - workflows: ['Continuous Deployment'] - types: - - completed - workflow_dispatch: - release: - types: [published, edited] -jobs: - migrate: - runs-on: ubuntu-latest - environment: Migration - steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - - name: Set up Node.js - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Install Node.js dependencies - run: yarn - - - name: Run migrations - run: yarn migrate:db - env: - DATABASE_URL: ${{ secrets.DATABASE_URL }} diff --git a/.github/workflows/schema.yml b/.github/workflows/schema.yml deleted file mode 100644 index 84678c4..0000000 --- a/.github/workflows/schema.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Inspect GraphQL -on: - pull_request: - branches: - - master - -jobs: - inspect_schema: - name: Inspect GraphQL schema - runs-on: ubuntu-latest - steps: - - name: Check out Git repository - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v1 - with: - node-version: 14 - - name: Report GraphQL Schema - uses: kamilkisiela/graphql-inspector@v2.5.0 - with: - schema: 'master:src/__generated__/schema.graphql' - github-token: ${{ secrets.GITHUB_TOKEN }} - fail-on-breaking: false diff --git a/src/lib/pubsub/index.ts b/src/lib/pubsub/index.ts index 4ea01b1..48959a9 100644 --- a/src/lib/pubsub/index.ts +++ b/src/lib/pubsub/index.ts @@ -4,7 +4,6 @@ import Redis from 'ioredis'; const options: Redis.RedisOptions = { host: process.env.REDIS_HOST, - password: process.env.REDIS_PASSWORD, port: 6380, tls: { servername: process.env.REDIS_HOST,