Spaces:
Runtime error
Runtime error
FROM neo4j:5.13.0-community | |
#USER root | |
## Update package list and install Python, pip, supervisor, git, curl, gnupg2, yarn, and nodejs | |
#RUN apt-get update && \ | |
# apt-get install -y python3 python3-pip supervisor git curl gnupg2 && \ | |
# apt-get clean && \ | |
# rm -rf /var/lib/apt/lists/* && \ | |
# curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
# echo "deb https://dl.yarnpkg.com/debian/ stable main" |tee /etc/apt/sources.list.d/yarn.list && \ | |
# apt-get update && \ | |
# mkdir -p /etc/apt/keyrings && \ | |
# curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ | |
# echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ | |
# apt-get update && \ | |
# apt-get install -y yarn nodejs && \ | |
# apt-get clean && \ | |
# rm -rf /var/lib/apt/lists/* | |
# | |
## Set up a new user named "user" with user ID 1000 | |
#RUN useradd -m -u 1000 user | |
# | |
## Set permissions for the /app directory | |
#RUN mkdir -p /app && chmod -R 777 /app | |
# | |
## Set permissions for Neo4j import directory | |
#RUN chmod -R 777 /var/lib/neo4j/import | |
# Install supervisord | |
RUN apt-get update && \ | |
apt-get install -y supervisor git python3 python3-pip curl && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
RUN useradd -m -u 1000 user | |
RUN mkdir -p /app && chown user:user /app | |
# Switch to the "user" user | |
USER user | |
# Set the working directory to /app | |
WORKDIR /app | |
# Continue with your setup... | |
COPY supervisord.conf /app/supervisord.conf | |
COPY neo4j.conf /app/neo4j.conf | |
COPY data/ /app/data/ | |
COPY scripts/ /app/scripts/ | |
COPY init_neo4j.sh /app/init_neo4j.sh | |
## Clone NeoDash and install dependencies | |
#RUN git clone https://github.com/neo4j-labs/neodash && \ | |
# chmod -R 777 /app/neodash | |
# | |
#WORKDIR /app/neodash | |
#RUN yarn install --verbose | |
# RUN yarn run dev | |
## Install Python packages as non-root user | |
RUN pip install --user git+https://github.com/coderanger/supervisor-stdout.git | |
# Expose Neo4j and NeoDash ports | |
EXPOSE 7687 7474 7473 8080 3000 | |
ENV NEO4J_AUTH=none | |
ENV NEO4J_CONF=/app | |
# Start supervisord | |
CMD ["/usr/bin/supervisord", "-c", "/app/supervisord.conf"] | |