mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix
- Automatic change of windows line endings when building docker image - Creating characters, chats, avatars folders before adding defaults
This commit is contained in:
@ -6,7 +6,6 @@ ARG APP_HOME=/home/node/app
|
||||
# Create app directory
|
||||
WORKDIR ${APP_HOME}
|
||||
|
||||
|
||||
# Install app dependencies
|
||||
COPY package*.json ./
|
||||
RUN \
|
||||
@ -14,7 +13,7 @@ RUN \
|
||||
npm install
|
||||
|
||||
# Bundle app source
|
||||
COPY . .
|
||||
COPY . ./
|
||||
|
||||
# Copy default chats, characters and user avatars to <folder>.default folder
|
||||
RUN \
|
||||
@ -30,7 +29,9 @@ RUN \
|
||||
rm -rf "./docker" && \
|
||||
rm -rf "./.git" && \
|
||||
echo "*** Make docker-entrypoint.sh executable ***" && \
|
||||
chmod +x "./docker-entrypoint.sh"
|
||||
chmod +x "./docker-entrypoint.sh" && \
|
||||
echo "*** Convert line endings to Unix format ***" && \
|
||||
dos2unix "./docker-entrypoint.sh"
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
# Check if the "characters" directory is empty
|
||||
if [ -z "$(ls -A /home/node/app/public/characters)" ]; then
|
||||
echo "Characters directory is empty. Copying default characters."
|
||||
mkdir /home/node/app/public/characters
|
||||
mv /home/node/app/public/characters.default/* /home/node/app/public/characters/
|
||||
rm -rf /home/node/app/public/characters.default
|
||||
fi
|
||||
@ -10,6 +11,7 @@ fi
|
||||
# Check if the "chats" directory is empty
|
||||
if [ -z "$(ls -A /home/node/app/public/chats)" ]; then
|
||||
echo "Chats directory is empty. Copying default chats."
|
||||
mkdir /home/node/app/public/chats
|
||||
mv /home/node/app/public/chats.default/* /home/node/app/public/chats/
|
||||
rm -rf /home/node/app/public/chats.default
|
||||
fi
|
||||
@ -17,7 +19,8 @@ fi
|
||||
# Check if the "User Avatars" directory is empty
|
||||
if [ -z "$(ls -A '/home/node/app/public/User Avatars')" ]; then
|
||||
echo "User Avatars directory is empty. Copying default user avatars."
|
||||
mv /home/node/app/public/User\ Avatars.default/* '/home/node/app/public/User Avatars/'
|
||||
mkdir /home/node/app/public/User\ Avatars
|
||||
mv /home/node/app/public/User\ Avatars.default/* /home/node/app/public/User\ Avatars/
|
||||
rm -rf /home/node/app/public/User\ Avatars.default
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user