File size: 614 Bytes
7106d2c 5652835 7106d2c 5652835 171330f 5652835 7106d2c 44da43a 171330f 5652835 171330f 7106d2c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# Use the official Node.js image as the base image
FROM node:20.4
# Set the working directory in the container
WORKDIR /app
# Clone repository with secret mount
RUN --mount=type=secret,id=CLONE,mode=0444,required=true \
git clone https://github.com/tutoihoc/SillyTavern.git .
# Change ownership and permissions
RUN chown -R node:node /app && \
chmod -R 755 /app
# Switch to non-root user
USER node
# Install dependencies
RUN npm install
# Create webpack directory with correct permissions
RUN mkdir -p /app/dist/webpack && \
chmod -R 755 /app/dist
# Start the application
CMD ["node", "server.js"] |