javaer123/Sillytavern
0
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 18ENV fetch ""19# 代理转发地址20ENV reverse_proxy ""21# 代理转发token22ENV proxy_password ""23# gemini token24ENV api_key_makersuite ""25# github 项目访问凭证token26ENV github_secret ""27# github 项目名称28ENV github_project ""29 30# Install app dependencies31# COPY package*.json post-install.js ./32RUN git clone https://github.com/SillyTavern/SillyTavern.git --branch 1.13.0 .33RUN \34 echo "*** Install npm packages ***" && \35 npm install && npm cache clean --force36 37# Bundle app source38# COPY . ./39 40ADD launch.sh launch.sh41RUN curl -JLO https://github.com/bincooo/SillyTavern-Docker/releases/download/v1.0.0/git-batch42RUN chmod +x launch.sh && chmod +x git-batch && ./git-batch -h43 44RUN \45 echo "*** Install npm packages ***" && \46 npm i --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force47 48# Copy default chats, characters and user avatars to <folder>.default folder49RUN \50 rm -f "config.yaml" || true && \51 ln -s "./config/config.yaml" "config.yaml" || true && \52 mkdir "config" || true53 54# Cleanup unnecessary files55RUN \56 echo "*** Cleanup ***" && \57 mv "./docker/docker-entrypoint.sh" "./" && \58 rm -rf "./docker" && \59 echo "*** Make docker-entrypoint.sh executable ***" && \60 chmod +x "./docker-entrypoint.sh" && \61 echo "*** Convert line endings to Unix format ***" && \62 dos2unix "./docker-entrypoint.sh"63RUN sed -i 's/# Start the server/.\/launch.sh env \&\& .\/launch.sh init/g' docker-entrypoint.sh64RUN chmod -R 777 ${APP_HOME}65 66EXPOSE 800067 68CMD [ "./docker-entrypoint.sh" ]69 