Add docs and support for Render.com deployments (khanon/oai-reverse-proxy!9)
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
FROM node:18-bullseye-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 7860
|
||||
|
||||
CMD [ "npm", "start" ]
|
||||
@@ -0,0 +1,11 @@
|
||||
FROM node:18-bullseye-slim
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git
|
||||
RUN git clone https://gitgud.io/khanon/oai-reverse-proxy.git /app
|
||||
WORKDIR /app
|
||||
RUN npm install
|
||||
COPY Dockerfile greeting.md* .env* ./
|
||||
RUN npm run build
|
||||
EXPOSE 7860
|
||||
ENV NODE_ENV=production
|
||||
CMD [ "npm", "start" ]
|
||||
@@ -0,0 +1,27 @@
|
||||
# syntax = docker/dockerfile:1.2
|
||||
|
||||
FROM node:18-bullseye-slim
|
||||
RUN apt-get update && \
|
||||
apt-get install -y curl
|
||||
|
||||
# Unlike Huggingface, Render can only deploy straight from a git repo and
|
||||
# doesn't allow you to create or modify arbitrary files via the web UI.
|
||||
# To use a greeting file, set `GREETING_URL` to a URL that points to a raw
|
||||
# text file containing your greeting, such as a GitHub Gist.
|
||||
|
||||
# You may need to clear the build cache if you change the greeting, otherwise
|
||||
# Render will use the cached layer from the previous build.
|
||||
|
||||
WORKDIR /app
|
||||
ARG GREETING_URL
|
||||
RUN if [ -n "$GREETING_URL" ]; then \
|
||||
curl -sL "$GREETING_URL" > greeting.md; \
|
||||
fi
|
||||
COPY package*.json greeting.md* ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN --mount=type=secret,id=_env,dst=/etc/secrets/.env cat /etc/secrets/.env >> .env
|
||||
EXPOSE 10000
|
||||
ENV NODE_ENV=production
|
||||
CMD [ "npm", "start" ]
|
||||
Reference in New Issue
Block a user