clash-linux commited on
Commit
c8b53b1
·
verified ·
1 Parent(s): 47a399d

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -2
Dockerfile CHANGED
@@ -162,10 +162,28 @@ ENTRYPOINT ["tini", "--", "sh", "-c", " \
162
  # --- END: Dynamically Install Plugins at Runtime --- \
163
 
164
  echo 'Starting SillyTavern server directly...'; \
165
- # Remove .gitignore right before starting the server
 
 
 
166
  rm -f .gitignore && \
167
- # Remove .git directory right before starting the server
 
 
 
 
 
 
 
168
  rm -rf .git && \
 
 
 
 
 
 
 
 
169
  # Execute node server directly, bypassing docker-entrypoint.sh
170
  exec node server.js; \
171
  "]
 
162
  # --- END: Dynamically Install Plugins at Runtime --- \
163
 
164
  echo 'Starting SillyTavern server directly...'; \
165
+
166
+ # --- BEGIN: Cleanup before start --- \
167
+ # Remove .gitignore
168
+ echo 'Attempting final removal of .gitignore...' && \
169
  rm -f .gitignore && \
170
+ if [ ! -e .gitignore ]; then \
171
+ echo '.gitignore successfully removed.'; \
172
+ else \
173
+ # This case is unlikely with rm -f unless permissions prevent removal
174
+ echo 'WARN: .gitignore could not be removed or reappeared.'; \
175
+ fi; \
176
+ # Remove .git directory
177
+ echo 'Attempting final removal of .git directory...' && \
178
  rm -rf .git && \
179
+ if [ ! -d .git ]; then \
180
+ echo '.git directory successfully removed.'; \
181
+ else \
182
+ # This case usually indicates a permission issue
183
+ echo 'WARN: .git directory could not be removed.'; \
184
+ fi; \
185
+ # --- END: Cleanup before start --- \
186
+
187
  # Execute node server directly, bypassing docker-entrypoint.sh
188
  exec node server.js; \
189
  "]