Spaces:
Runtime error
Runtime error
update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# HuggingFace Spaces Dockerfile for Overleaf with Japanese LaTeX
|
| 2 |
#
|
| 3 |
-
# FIXED:
|
| 4 |
#
|
| 5 |
# Features:
|
| 6 |
# - Full TeX Live 2025 with Japanese support
|
|
@@ -34,7 +34,7 @@ RUN rm -f /etc/runit/mongo 2>/dev/null || true
|
|
| 34 |
RUN rm -f /etc/runit/redis 2>/dev/null || true
|
| 35 |
|
| 36 |
# ============================================
|
| 37 |
-
# STEP 3: CREATE CUSTOM INIT SCRIPT
|
| 38 |
# ============================================
|
| 39 |
RUN cat > /etc/my_init.d/00_start_services.sh << 'EOFSCRIPT'
|
| 40 |
#!/bin/bash
|
|
@@ -65,12 +65,13 @@ echo "Directories created: $(ls -la /data/)"
|
|
| 65 |
echo "=== STARTING MONGODB ==="
|
| 66 |
set +e
|
| 67 |
|
|
|
|
| 68 |
mongod --dbpath /data/mongo \
|
| 69 |
--bind_ip 127.0.0.1 \
|
| 70 |
--replSet overleaf \
|
| 71 |
--port 27017 \
|
| 72 |
--logpath /var/log/mongodb/mongodb.log \
|
| 73 |
-
--
|
| 74 |
2>&1 &
|
| 75 |
|
| 76 |
MONGOPID=$!
|
|
@@ -89,7 +90,7 @@ done
|
|
| 89 |
# Check if MongoDB is still running
|
| 90 |
if ! kill -0 $MONGOPID 2>/dev/null; then
|
| 91 |
echo "MongoDB failed to start. Log output:"
|
| 92 |
-
cat /var/log/mongodb/mongodb.log 2>/dev/null ||
|
| 93 |
exit 1
|
| 94 |
fi
|
| 95 |
|
|
|
|
| 1 |
# HuggingFace Spaces Dockerfile for Overleaf with Japanese LaTeX
|
| 2 |
#
|
| 3 |
+
# FIXED: MongoDB 8.0 command options
|
| 4 |
#
|
| 5 |
# Features:
|
| 6 |
# - Full TeX Live 2025 with Japanese support
|
|
|
|
| 34 |
RUN rm -f /etc/runit/redis 2>/dev/null || true
|
| 35 |
|
| 36 |
# ============================================
|
| 37 |
+
# STEP 3: CREATE CUSTOM INIT SCRIPT
|
| 38 |
# ============================================
|
| 39 |
RUN cat > /etc/my_init.d/00_start_services.sh << 'EOFSCRIPT'
|
| 40 |
#!/bin/bash
|
|
|
|
| 65 |
echo "=== STARTING MONGODB ==="
|
| 66 |
set +e
|
| 67 |
|
| 68 |
+
# MongoDB 8.0 doesn't support --logAppend, use --logg append instead
|
| 69 |
mongod --dbpath /data/mongo \
|
| 70 |
--bind_ip 127.0.0.1 \
|
| 71 |
--replSet overleaf \
|
| 72 |
--port 27017 \
|
| 73 |
--logpath /var/log/mongodb/mongodb.log \
|
| 74 |
+
--wiredTigerDirectoryForIndexes \
|
| 75 |
2>&1 &
|
| 76 |
|
| 77 |
MONGOPID=$!
|
|
|
|
| 90 |
# Check if MongoDB is still running
|
| 91 |
if ! kill -0 $MONGOPID 2>/dev/null; then
|
| 92 |
echo "MongoDB failed to start. Log output:"
|
| 93 |
+
cat /var/log/mongodb/mongodb.log 2>/dev/null || echo "No log found"
|
| 94 |
exit 1
|
| 95 |
fi
|
| 96 |
|