feat(docker-file): use SearXNG URL from env
This commit is contained in:
parent
07e5615860
commit
1fcd64ad42
|
@ -1,6 +1,7 @@
|
||||||
FROM node:slim
|
FROM node:slim
|
||||||
|
|
||||||
ARG SEARXNG_API_URL
|
ARG SEARXNG_API_URL
|
||||||
|
ENV SEARXNG_API_URL=${SEARXNG_API_URL}
|
||||||
|
|
||||||
WORKDIR /home/perplexica
|
WORKDIR /home/perplexica
|
||||||
|
|
||||||
|
@ -11,8 +12,6 @@ COPY drizzle.config.ts /home/perplexica/
|
||||||
COPY package.json /home/perplexica/
|
COPY package.json /home/perplexica/
|
||||||
COPY yarn.lock /home/perplexica/
|
COPY yarn.lock /home/perplexica/
|
||||||
|
|
||||||
RUN sed -i "s|SEARXNG = \".*\"|SEARXNG = \"${SEARXNG_API_URL}\"|g" /home/perplexica/config.toml
|
|
||||||
|
|
||||||
RUN mkdir /home/perplexica/data
|
RUN mkdir /home/perplexica/data
|
||||||
|
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
|
|
|
@ -40,7 +40,8 @@ export const getGroqApiKey = () => loadConfig().API_KEYS.GROQ;
|
||||||
|
|
||||||
export const getAnthropicApiKey = () => loadConfig().API_KEYS.ANTHROPIC;
|
export const getAnthropicApiKey = () => loadConfig().API_KEYS.ANTHROPIC;
|
||||||
|
|
||||||
export const getSearxngApiEndpoint = () => loadConfig().API_ENDPOINTS.SEARXNG;
|
export const getSearxngApiEndpoint = () =>
|
||||||
|
process.env.SEARXNG_API_URL || loadConfig().API_ENDPOINTS.SEARXNG;
|
||||||
|
|
||||||
export const getOllamaApiEndpoint = () => loadConfig().API_ENDPOINTS.OLLAMA;
|
export const getOllamaApiEndpoint = () => loadConfig().API_ENDPOINTS.OLLAMA;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue