Skip to content

Commit 896d34a

Browse files
committed
updated Dockerfile to copy config.sample.json to the correct path and adjusted config handler to use environment variable for sample config path
1 parent d4c14a1 commit 896d34a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM oven/bun:1 AS base
33
WORKDIR /opt/netignite/app
44

55
COPY . .
6-
COPY ./config/config.sample.json /opt/netignite/config/config.sample.json
6+
COPY ./config/config.sample.json /etc/netignite/config.sample.json
77

88
RUN bun install --production
99
RUN bun run build
@@ -24,5 +24,6 @@ EXPOSE 18232/tcp
2424
ENV NITRO_ENV=production
2525
ENV NITRO_HOST=0.0.0.0
2626
ENV NITRO_PORT=18232
27+
ENV NETIGNITE_SAMPLE_CONFIG_PATH=/etc/netignite/config.sample.json
2728

2829
CMD [ "bun", "run", "./app/server/index.mjs" ]

server/utils/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface ConfigLike {
1010
export class ConfigHandler {
1111

1212
private static readonly configFilePath = process.env.CONFIG_FILE_PATH || './config/config.json';
13-
private static readonly sampleConfigFilePath = './config/config.sample.json';
13+
private static readonly sampleConfigFilePath = process.env.NETIGNITE_SAMPLE_CONFIG_PATH || './config/config.sample.json';
1414

1515
private static config: ConfigLike | null = null;
1616

0 commit comments

Comments
 (0)