adds SHA to infopage
This commit is contained in:
parent
75e004d2b1
commit
1238ee77c9
|
@ -24,6 +24,8 @@ RUN apt-get update && \
|
||||||
apt-get install -y git
|
apt-get install -y git
|
||||||
RUN git clone https://github.com/nai-degen/oai-reverse-proxy.git /app
|
RUN git clone https://github.com/nai-degen/oai-reverse-proxy.git /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
RUN git rev-parse HEAD > git-commit-sha.txt
|
||||||
|
ENV SHA=$(cat git-commit-sha.txt)
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
|
@ -53,6 +53,7 @@ function getInfoPageHtml(host: string) {
|
||||||
...(config.modelRateLimit ? { proomptingNow: getUniqueIps() } : {}),
|
...(config.modelRateLimit ? { proomptingNow: getUniqueIps() } : {}),
|
||||||
keyInfo,
|
keyInfo,
|
||||||
config: listConfig(),
|
config: listConfig(),
|
||||||
|
sha: (process.env.SHA?.slice(0, 7) || "dev").toUpperCase(),
|
||||||
};
|
};
|
||||||
|
|
||||||
const readme = require("fs").readFileSync("README.md", "utf8");
|
const readme = require("fs").readFileSync("README.md", "utf8");
|
||||||
|
|
Loading…
Reference in New Issue