Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to mount local config folder with apoc.conf #461

Open
ThomasThelen opened this issue Sep 9, 2023 · 2 comments
Open

Unable to mount local config folder with apoc.conf #461

ThomasThelen opened this issue Sep 9, 2023 · 2 comments
Labels

Comments

@ThomasThelen
Copy link

I have a neo4j local deployment that needs to have an apoc.conf file. To include this in the deployment, I'm mounting the local volume with apoc.conf into neo4j's container folder, /var/lib/neo4j/conf. When running docker-compose up, the container dies and I get an error message ( see steps below) in the docker logs.

Neo4j Version: 5.11.0-community-bullseye
Operating System: MacOS 13.5.1 (22G90)
API: Docker

Steps to reproduce

  1. Create ~/deployment
  2. Add the docker-compose.yml file below to it
  3. Create ~/deployment/neo4j/conf
  4. Add the apoc.conf file below to it
  5. Run docker-compose up
  6. See that the deployment failed
  7. Check the logs with docker ps --all and docker logs
  8. See similar error to sed: couldn't open temporary file /var/lib/neo4j/conf/sed8CXFyW: Permission denied
  9. See sed file in the mounted config folder

Expected behavior

The apoc.conf file is copied into the container, and the application runs without error

Actual behavior

A new file is created in the mounted directory without permissions, causing the deployment to fail

----------  1 thomas  staff    0 Sep  8 21:02 sedUqUrUV

Local setup

Filesystem

- deployment
   - docker-compose.yaml
   - neo4j
      - conf
         - apoc.conf

docker-compose.yml

services:
  neo4j:
    image: neo4j:5.11.0-community-bullseye
    container_name: neo4j
    ports:
      - "7474:7474"
      - "7687:7687"
    environment:
      - NEO4J_AUTH=neo4j/neo4j222
    volumes:
      - ~/deployment/neo4j/conf:/var/lib/neo4j/conf

apoc.conf

apoc.import.file.enable=true
@mnd999 mnd999 transferred this issue from neo4j/neo4j Sep 11, 2023
@MarlinMr
Copy link

bump

@koumi15cancer
Copy link

Hi, I 've explored and tried to simulated this issue.

For the solution, I see that we could mount to the outside folder and it will be written directly to the var/lib folder. The default of the config file is also mentioned in their docs for Linux and MacOS, docker environment

- ./example/docker/neo4j/conf:/conf

https://neo4j.com/docs/operations-manual/current/configuration/file-locations/?utm_source=google&utm_medium=PaidSearch&utm_campaign=GDB&utm_content=APAC-X-Awareness-GDB-Text&utm_term=&gad_source=1&gclid=CjwKCAiAx_GqBhBQEiwAlDNAZihhvFpWKNw1zPsF795zKKSiWFslH-6zc3cqFzkoMB0rqoW3IONFMxoCL_4QAvD_BwE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants