CoolFace
Apppublic

fdgdss/st

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile79 linesDownload Raw Back to root
1FROM node:19.1.0-alpine3.162 3# Arguments4ARG APP_HOME=/home/node/app5 6# Install system dependencies7RUN apk add gcompat tini git jq curl8 9# Ensure proper handling of kernel signals10ENTRYPOINT [ "tini", "--" ]11 12# Create app directory13WORKDIR ${APP_HOME}14 15# Set NODE_ENV to production16ENV NODE_ENV=production17 18# Env19# 是否远程获取下面的参数 是个链接,返回一个json;执行完后关闭这个链接即可保密20# 返回内容:21#  {22#    "reverse_proxy": "https://onekey.xxx.top/v1",23#    "proxy_password": "sk-ssvJn4VQAk596Lvv3548xxx",24#    "api_key_makersuite": "AIzaSyAm5S9kl22DDNSXmnd4vgxxx",25#    "github_secret": "github_pat_11AIWDQ2A0cLSEdwiwiZNC_10II4TsFExxx",26#    "github_project": "bincooo/history"27#  }28ENV fetch ""29# 代理转发地址30ENV reverse_proxy ""31# 代理转发token32ENV proxy_password ""33# gemini token34ENV api_key_makersuite ""35# github 项目访问凭证token36ENV github_secret "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"37# github 项目名称38ENV github_project "dvxvz/history"39 40# Install app dependencies41# COPY package*.json post-install.js ./42RUN git clone https://github.com/SillyTavern/SillyTavern.git --branch 1.12.14 .43RUN \44  echo "*** Install npm packages ***" && \45  npm install && npm cache clean --force46 47# Bundle app source48# COPY . ./49 50ADD launch.sh launch.sh51RUN curl -JLO  https://github.com/bincooo/SillyTavern-Docker/releases/download/v1.0.0/git-batch52RUN chmod +x launch.sh && chmod +x git-batch && ./git-batch -h53 54RUN \55  echo "*** Install npm packages ***" && \56  npm i --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force57 58# Copy default chats, characters and user avatars to <folder>.default folder59RUN \60  rm -f "config.yaml" || true && \61  ln -s "./config/config.yaml" "config.yaml" || true && \62  mkdir "config" || true63 64# Cleanup unnecessary files65RUN \66  echo "*** Cleanup ***" && \67  mv "./docker/docker-entrypoint.sh" "./" && \68  rm -rf "./docker" && \69  echo "*** Make docker-entrypoint.sh executable ***" && \70  chmod +x "./docker-entrypoint.sh" && \71  echo "*** Convert line endings to Unix format ***" && \72  dos2unix "./docker-entrypoint.sh"73RUN sed -i 's/# Start the server/.\/launch.sh env \&\& .\/launch.sh init/g' docker-entrypoint.sh74RUN chmod -R 777 ${APP_HOME}75 76EXPOSE 800077 78CMD [ "./docker-entrypoint.sh" ]79