Skip to content

Commit

Permalink
fix: link service and node version in server docker
Browse files Browse the repository at this point in the history
  • Loading branch information
saimanoj committed Jul 9, 2023
1 parent 758dc8f commit 492ff60
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ENGINE_VERSION=0.1.4-alpha
ENGINE_VERSION=0.1.5-alpha

# POSTGRES
POSTGRES_USER=docker
Expand Down Expand Up @@ -26,7 +26,7 @@ JWT_ACCESS_SECRET=nestjsPrismaAccessSecret
JWT_REFRESH_SECRET=nestjsPrismaRefreshSecret

FRONTEND_HOST=http://localhost:8000
PUBLIC_FRONTEND_HOST=https://app.poozle.dev
PUBLIC_FRONTEND_HOST=http://localhost:8000
BACKEND_HOST=http://localhost:3000
BACKEND_URL=http://server:3000

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:
db:
image: "postgres:latest"
image: "postgres:14-bullseye"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
Expand Down
4 changes: 2 additions & 2 deletions engine-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS builder
FROM node:18-alpine AS builder

# Create app directory
WORKDIR /app
Expand All @@ -15,7 +15,7 @@ COPY . .

RUN npm run build

FROM node:16-alpine
FROM node:18-alpine

COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package*.json ./
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
- Added the required column `linkIdentifier` to the `Link` table without a default value. This is not possible if the table is not empty.
*/
-- AlterEnum
ALTER TYPE "IntegrationType" ADD VALUE 'DOCS';

-- DropIndex
DROP INDEX "IntegrationAccount_integrationAccountName_workspaceId_key";

Expand Down
7 changes: 6 additions & 1 deletion engine-server/src/modules/link/link.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class LinkService {
},
});


const differenceSeconds = differenceInSeconds(
new Date(),
new Date(link.createdAt),
Expand Down Expand Up @@ -65,7 +66,7 @@ export class LinkService {
integrationDefinitions = [integrationDefinition];
}

return {
const response = {
expired: differenceSeconds < link.expiresIn ? false : true,
...link,
integrationAccounts: link.IntegrationAccount.map(
Expand All @@ -76,6 +77,10 @@ export class LinkService {
),
integrationDefinitions,
};

delete response["IntegrationAccount"];

return response
}

async getLinksForWorkspace(workspaceIdQueryRequest: WorkspaceIdQueryRequest) {
Expand Down

0 comments on commit 492ff60

Please sign in to comment.