Skip to content

Commit

Permalink
ddex: remove docker user (#8572)
Browse files Browse the repository at this point in the history
  • Loading branch information
stereosteve authored May 22, 2024
1 parent 5565d7d commit 8a1f226
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 1 addition & 5 deletions packages/ddex/processor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion packages/ddex/processor/src/sources.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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[]
}
Expand Down

0 comments on commit 8a1f226

Please sign in to comment.