diff --git a/infra/prod/server/Dockerfile b/infra/prod/server/Dockerfile index 97ddbc2dd..39298dd65 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 8d04a78c9..025ad9956 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 bf9a5d821..516c644c9 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 f4a3d4686..ef4e475b2 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 {