From 29fb781c26ae508318d6e36e2ceeb59f12dc75af Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 26 May 2023 16:30:41 +0200 Subject: [PATCH] Updating server configuration (#145) Update server deploy staging --- infra/prod/server/Dockerfile | 2 -- server/.env.example | 6 +++--- server/src/auth/strategies/google.auth.strategy.ts | 2 +- server/src/database/schema.prisma | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/infra/prod/server/Dockerfile b/infra/prod/server/Dockerfile index 97ddbc2ddd..39298dd658 100644 --- a/infra/prod/server/Dockerfile +++ b/infra/prod/server/Dockerfile @@ -1,7 +1,5 @@ FROM node:18.16.0-alpine as server -ARG SERVER_DATABASE_URL - WORKDIR /app/server COPY ./server/package.json ./ COPY ./server/package-lock.json ./ diff --git a/server/.env.example b/server/.env.example index 8d04a78c92..025ad99567 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1,7 +1,7 @@ AUTH_GOOGLE_CLIENT_ID=REPLACE_ME -AUTH_GOOGLE_SECRET=REPLACE_ME -AUTH_GOOGLE_CALLBACK_URL='http://localhost:3000/google/redirect' +AUTH_GOOGLE_CLIENT_SECRET=REPLACE_ME +AUTH_GOOGLE_CALLBACK_URL=http://localhost:3000/google/redirect JWT_SECRET=secret_jwt JWT_EXPIRES_IN=300 -SERVER_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/default?connection_limit=1 +PG_DATABASE_URL=postgres://postgres:postgrespassword@postgres:5432/default?connection_limit=1 FRONT_AUTH_CALLBACK_URL=http://localhost:3001/auth/callback \ No newline at end of file diff --git a/server/src/auth/strategies/google.auth.strategy.ts b/server/src/auth/strategies/google.auth.strategy.ts index bf9a5d8218..516c644c9e 100644 --- a/server/src/auth/strategies/google.auth.strategy.ts +++ b/server/src/auth/strategies/google.auth.strategy.ts @@ -10,7 +10,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') { constructor(configService: ConfigService) { super({ clientID: configService.get('AUTH_GOOGLE_CLIENT_ID'), - clientSecret: configService.get('AUTH_GOOGLE_SECRET'), + clientSecret: configService.get('AUTH_GOOGLE_CLIENT_SECRET'), callbackURL: configService.get('AUTH_GOOGLE_CALLBACK_URL'), scope: ['email', 'profile'], }); diff --git a/server/src/database/schema.prisma b/server/src/database/schema.prisma index f4a3d4686e..ef4e475b20 100644 --- a/server/src/database/schema.prisma +++ b/server/src/database/schema.prisma @@ -5,7 +5,7 @@ generator client { datasource db { provider = "postgresql" - url = env("SERVER_DATABASE_URL") + url = env("PG_DATABASE_URL") } generator nestgraphql {