From 8a1f226360826450b3a483399ee9c61d692182df Mon Sep 17 00:00:00 2001 From: Steve Perkins Date: Wed, 22 May 2024 12:34:24 -0400 Subject: [PATCH] ddex: remove docker user (#8572) --- packages/ddex/processor/Dockerfile | 6 +----- packages/ddex/processor/src/sources.ts | 4 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/ddex/processor/Dockerfile b/packages/ddex/processor/Dockerfile index e91888e713a..84f7bdb8896 100644 --- a/packages/ddex/processor/Dockerfile +++ b/packages/ddex/processor/Dockerfile @@ -45,12 +45,8 @@ FROM node:18-alpine AS runner RUN apk add --no-cache python3 py3-pip make g++ curl bash libc6-compat RUN apk update -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nodejs -USER nodejs - WORKDIR /app -COPY --from=app-builder --chown=nodejs:nodejs /app . +COPY --from=app-builder /app . WORKDIR /app/packages/ddex/processor EXPOSE 9001 diff --git a/packages/ddex/processor/src/sources.ts b/packages/ddex/processor/src/sources.ts index 738aa4019db..97c10484b2c 100644 --- a/packages/ddex/processor/src/sources.ts +++ b/packages/ddex/processor/src/sources.ts @@ -1,5 +1,7 @@ import { readFileSync } from 'fs' +const sourcesLocation = process.env.SOURCES_LOCATION || './data/sources.json' + export type SourceConfig = { env?: 'production' | 'staging' | 'development' name: string @@ -17,7 +19,7 @@ let sourceList: SourceConfig[] = [] export const sources = { load(configPath?: string) { try { - const j = readFileSync(configPath || './sources.json', 'utf8') + const j = readFileSync(configPath || sourcesLocation, 'utf8') const sourceConfig = JSON.parse(j) as { sources: SourceConfig[] }