Skip to content

Commit

Permalink
fix(config): adapt to docker env
Browse files Browse the repository at this point in the history
  • Loading branch information
finxol committed Jan 17, 2025
1 parent 1098955 commit 918b6f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
ENV TURBO_TELEMETRY_DISABLED=1
# The port that the api listens to.
ENV API=localhost:1993
ENV DOCKER=1

ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
Expand Down
4 changes: 3 additions & 1 deletion packages/config/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import {
} from "./schema.js"
import { toInt } from "./utils.js"

const CONFIG_DIR = process.env.CONFIG_DIR || "../../config"
const CONFIG_DIR =
process.env.CONFIG_DIR ||
(process.env.DOCKER === "1" ? "/app/config" : "../../config")
const CONFIG_FILENAME = process.env.CONFIG_FILE || "karr.config"

/**
Expand Down

0 comments on commit 918b6f0

Please sign in to comment.