Spaces:
Paused
Paused
Upload Dockerfile
Browse files- Dockerfile +12 -0
Dockerfile
CHANGED
|
@@ -75,6 +75,18 @@ EXPOSE 8000
|
|
| 75 |
|
| 76 |
# Entrypoint: Read config from environment variable CONFIG_YAML if set, copy default if not, configure git, then run node server.js directly
|
| 77 |
ENTRYPOINT ["tini", "--", "sh", "-c", " \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
echo '--- Checking for CONFIG_YAML environment variable ---'; \
|
| 79 |
# Ensure the CWD has correct permissions for writing config.yaml
|
| 80 |
# mkdir -p ./config && chown node:node ./config; # Removed mkdir
|
|
|
|
| 75 |
|
| 76 |
# Entrypoint: Read config from environment variable CONFIG_YAML if set, copy default if not, configure git, then run node server.js directly
|
| 77 |
ENTRYPOINT ["tini", "--", "sh", "-c", " \
|
| 78 |
+
# --- BEGIN: Update SillyTavern Core at Runtime --- \
|
| 79 |
+
echo '--- Attempting to update SillyTavern Core from GitHub (staging branch) ---'; \
|
| 80 |
+
if [ -d \".git\" ] && [ \"$(git rev-parse --abbrev-ref HEAD)\" = \"staging\" ]; then \
|
| 81 |
+
echo 'Existing staging branch found. Resetting and pulling latest changes...'; \
|
| 82 |
+
git reset --hard HEAD && \
|
| 83 |
+
git pull origin staging || echo 'WARN: git pull failed, continuing with code from build time.'; \
|
| 84 |
+
echo '--- SillyTavern Core update check finished. ---'; \
|
| 85 |
+
else \
|
| 86 |
+
echo 'WARN: .git directory not found or not on staging branch. Skipping runtime update. Code from build time will be used.'; \
|
| 87 |
+
fi; \
|
| 88 |
+
# --- END: Update SillyTavern Core at Runtime --- \
|
| 89 |
+
|
| 90 |
echo '--- Checking for CONFIG_YAML environment variable ---'; \
|
| 91 |
# Ensure the CWD has correct permissions for writing config.yaml
|
| 92 |
# mkdir -p ./config && chown node:node ./config; # Removed mkdir
|