bhuvanmdev commited on
Commit
43b73de
·
verified ·
1 Parent(s): 77e57ab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -11
Dockerfile CHANGED
@@ -45,23 +45,17 @@ RUN pip install --no-cache-dir --upgrade pip && \
45
  # Create directories first, then configure Neo4j to use them.
46
  RUN mkdir -p /app/neo4j_data /app/neo4j_logs
47
  RUN sed -i 's/#server.default_listen_address=127.0.0.1/server.default_listen_address=0.0.0.0/' ${NEO4J_HOME}/conf/neo4j.conf && \
48
- sed -i 's|#dbms.directories.data=data|dbms.directories.data=/app/neo4j_data|' ${NEO4J_HOME}/conf/neo4j.conf && \
49
- sed -i 's|#dbms.directories.logs=logs|dbms.directories.logs=/app/neo4j_logs|' ${NEO4J_HOME}/conf/neo4j.conf && \
50
- echo 'dbms.security.auth_enabled=false' >> ${NEO4J_HOME}/conf/neo4j.conf && \
51
  echo 'dbms.security.procedures.unrestricted=apoc.*' >> ${NEO4J_HOME}/conf/neo4j.conf
52
 
53
  # === Correctly Prepare and Place Data ===
54
  # The neo4j_data.zip file should be in the same directory as your Dockerfile
55
  COPY neo4j_data.zip /app/neo4j_data.zip
56
  # Unzip the data into a temporary directory first to inspect its structure
57
- RUN unzip /app/neo4j_data.zip -d /app && \
58
- rm -rf /app/neo4j_data.zip
59
- # RUN mkdir -p /app/temp_unzip && unzip /app/neo4j_data.zip -d /app/temp_unzip
60
- # Assuming the zip file contains 'neo4j_data' and 'neo4j_logs' folders,
61
- # move their *contents* to the correct final destination.
62
- # RUN mv /app/temp_unzip/neo4j_data/* /app/neo4j_data/ && \
63
- # mv /app/temp_unzip/neo4j_logs/* /app/neo4j_logs/ && \
64
- # rm -rf /app/temp_unzip /app/neo4j_data.zip
65
 
66
  # Create a non-root user 'user' with UID 1000 as required by Hugging Face Spaces
67
  RUN useradd -m -u 1000 user
 
45
  # Create directories first, then configure Neo4j to use them.
46
  RUN mkdir -p /app/neo4j_data /app/neo4j_logs
47
  RUN sed -i 's/#server.default_listen_address=127.0.0.1/server.default_listen_address=0.0.0.0/' ${NEO4J_HOME}/conf/neo4j.conf && \
 
 
 
48
  echo 'dbms.security.procedures.unrestricted=apoc.*' >> ${NEO4J_HOME}/conf/neo4j.conf
49
 
50
  # === Correctly Prepare and Place Data ===
51
  # The neo4j_data.zip file should be in the same directory as your Dockerfile
52
  COPY neo4j_data.zip /app/neo4j_data.zip
53
  # Unzip the data into a temporary directory first to inspect its structure
54
+ RUN mkdir -p /app/temp_unzip && unzip /app/neo4j_data.zip -d /app/temp_unzip
55
+ # Move the contents to the OFFICIAL Neo4j data and logs directories
56
+ RUN mv /app/temp_unzip/neo4j_data/* ${NEO4J_HOME}/data/ && \
57
+ mv /app/temp_unzip/neo4j_logs/* ${NEO4J_HOME}/logs/ && \
58
+ rm -rf /app/temp_unzip /app/neo4j_data.zip
 
 
 
59
 
60
  # Create a non-root user 'user' with UID 1000 as required by Hugging Face Spaces
61
  RUN useradd -m -u 1000 user