Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
on 10-23-2020 10:29 AM
I am running neo4j with docker, and I need to set apoc.export.file.enabled=true in the apoc config. But I don't know how to do this since the config file is nowhere to be found. Is there a tag I could use when calling "docker run"?
Hi cdanegallagher,
I think probably the easiest way is to pass it in as an --env variable, more on that here and here about how to do that.
I find examples helpful, so here is a snippet from my docker script file (note: I'm setting and expanding in the script quite a few local variables, and you don't have to do that, you could hard code the --env variable values if you wanted)
docker run \
--user $(id -u):$(id -g) \
--name "${CONTAINER}" \
--detach \
--restart unless-stopped \
--publish ${NEO_HTTPS}:${NEO_HTTPS} \
--publish ${NEO_HTTP}:${NEO_HTTP} \
--publish ${NEO_BOLT}:${NEO_BOLT} \
--env NEO4JLABS_PLUGINS="${NEO_PLUGINS}" \
--env NEO4J_dbms_connector_https_listen__address=0.0.0.0:${NEO_HTTPS} \
--env NEO4J_dbms_connector_http_listen__address=0.0.0.0:${NEO_HTTP} \
--env NEO4J_dbms_connector_bolt_listen__address=0.0.0.0:${NEO_BOLT} \
--env NEO4J_dbms_connector_https_advertised__address=${NEO_HOST}:${NEO_HTTPS} \
--env NEO4J_dbms_connector_http_advertised__address=${NEO_HOST}:${NEO_HTTP} \
--env NEO4J_dbms_connector_bolt_advertised__address=${NEO_HOST}:${NEO_BOLT} \
--volume ${NEO_GRAPH_DIR}/data:/data \
--volume ${NEO_GRAPH_DIR}/import:/import \
--volume ${NEO_GRAPH_DIR}/plugins:/plugins \
--volume ${NEO_GRAPH_DIR}/conf:/var/lib/neo4j/conf \
--volume ${NEO_GRAPH_DIR}/logs:/logs \
--env NEO4J_dbms_logs_query_enabled=false \
--env NEO4J_dbms_connector_bolt_advertised__address=${NEO_HOST}:${NEO_BOLT} \
--env NEO4J_dbms_active__database="${CONTAINER}" \
--env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes \
--env NEO4J_apoc_import_file_enabled=true \
--env NEO4J_apoc_export_file_enabled=true \
--env NEO4J_dbms_security_procedures_unrestricted=apoc.\\\*,gds.\\\* \
--env NEO4J_browser_remote__content__hostname__whitelist="${NEO_WHITELIST}" \
--env NEO4J_browser_post__connect__cmd="${NEO_PLAY}" \
--env NEO4J_dbms_memory_heap_initial__size=${NEO4J_dbms_memory_heap_initial__size} \
--env NEO4J_dbms_memory_heap_max__size=${NEO4J_dbms_memory_heap_max__size} \
--env NEO4J_dbms_memory_pagecache_size=${NEO4J_dbms_memory_pagecache_size} \
....
Ah. Thank you! That worked.
Excellent! Thank you letting us know, I appreciate it.