Spaces:
Paused
Paused
| FROM node:19.1.0-alpine3.16 | |
| # Arguments | |
| ARG APP_HOME=/home/node/app | |
| # Install system dependencies | |
| RUN apk add gcompat tini git jq curl | |
| # Ensure proper handling of kernel signals | |
| ENTRYPOINT [ "tini", "--" ] | |
| # Create app directory | |
| WORKDIR ${APP_HOME} | |
| # Set NODE_ENV to production | |
| ENV NODE_ENV=production | |
| # Env | |
| ENV fetch="" | |
| ENV username="root" | |
| ENV password="123456" | |
| ENV reverse_proxy="https://claude.oaiapi.icu/v1" | |
| ENV proxy_password="sk-DyYdMQNrVbw4dQSjKjTu87kcQ7pHZVezveoS1PDBLZQ4KPe4" | |
| ENV api_key_makersuite="AIzaSyB5XR7z9t8W2kvD_0CzTS6OTyQ6foFIetY" | |
| ENV github_secret="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" | |
| ENV github_project="gggitkf1976317/history" | |
| # Install app dependencies | |
| RUN git clone https://github.com/SillyTavern/SillyTavern.git --branch 1.12.11 . | |
| RUN \ | |
| echo "*** Install npm packages ***" && \ | |
| npm install && npm cache clean --force | |
| ADD launch.sh launch.sh | |
| RUN curl -JLO https://github.com/bincooo/SillyTavern-Docker/releases/download/v1.0.0/git-batch | |
| RUN chmod +x launch.sh && chmod +x git-batch && ./git-batch -h | |
| RUN \ | |
| echo "*** Install npm packages ***" && \ | |
| npm i --no-audit --no-fund --loglevel=error --no-progress --omit=dev && npm cache clean --force | |
| # Copy default chats, characters and user avatars to <folder>.default folder | |
| RUN \ | |
| rm -f "config.yaml" || true && \ | |
| ln -s "./config/config.yaml" "config.yaml" || true && \ | |
| mkdir "config" || true | |
| # Cleanup unnecessary files | |
| RUN \ | |
| echo "*** Cleanup ***" && \ | |
| mv "./docker/docker-entrypoint.sh" "./" && \ | |
| rm -rf "./docker" && \ | |
| echo "*** Make docker-entrypoint.sh executable ***" && \ | |
| chmod +x "./docker-entrypoint.sh" && \ | |
| echo "*** Convert line endings to Unix format ***" && \ | |
| dos2unix "./docker-entrypoint.sh" | |
| RUN sed -i 's/# Start the server/.\/launch.sh env \&\& .\/launch.sh init/g' docker-entrypoint.sh | |
| RUN chmod -R 777 ${APP_HOME} | |
| # 修改为 8002 | |
| EXPOSE 8002 | |
| CMD [ "./docker-entrypoint.sh" ] |