-
Notifications
You must be signed in to change notification settings - Fork 171
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
docker-entrypoint will now set default configs based on Neo4j Edition #192
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,14 +228,22 @@ fi | |
: ${NEO4J_dbms_connectors_default__advertised__address:=${NEO4J_dbms_connectors_defaultAdvertisedAddress:-}} | ||
: ${NEO4J_ha_server__id:=${NEO4J_ha_serverId:-}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. HA configurations are also enterprise specific, these configs that contain |
||
: ${NEO4J_ha_initial__hosts:=${NEO4J_ha_initialHosts:-}} | ||
: ${NEO4J_causal__clustering_expected__core__cluster__size:=${NEO4J_causalClustering_expectedCoreClusterSize:-}} | ||
: ${NEO4J_causal__clustering_initial__discovery__members:=${NEO4J_causalClustering_initialDiscoveryMembers:-}} | ||
: ${NEO4J_causal__clustering_discovery__listen__address:=${NEO4J_causalClustering_discoveryListenAddress:-"0.0.0.0:5000"}} | ||
: ${NEO4J_causal__clustering_discovery__advertised__address:=${NEO4J_causalClustering_discoveryAdvertisedAddress:-"$(hostname):5000"}} | ||
: ${NEO4J_causal__clustering_transaction__listen__address:=${NEO4J_causalClustering_transactionListenAddress:-"0.0.0.0:6000"}} | ||
: ${NEO4J_causal__clustering_transaction__advertised__address:=${NEO4J_causalClustering_transactionAdvertisedAddress:-"$(hostname):6000"}} | ||
: ${NEO4J_causal__clustering_raft__listen__address:=${NEO4J_causalClustering_raftListenAddress:-"0.0.0.0:7000"}} | ||
: ${NEO4J_causal__clustering_raft__advertised__address:=${NEO4J_causalClustering_raftAdvertisedAddress:-"$(hostname):7000"}} | ||
|
||
if [ "${NEO4J_EDITION}" == "enterprise" ]; | ||
then | ||
: ${NEO4J_causal__clustering_expected__core__cluster__size:=${NEO4J_causalClustering_expectedCoreClusterSize:-}} | ||
: ${NEO4J_causal__clustering_initial__discovery__members:=${NEO4J_causalClustering_initialDiscoveryMembers:-}} | ||
: ${NEO4J_causal__clustering_discovery__advertised__address:=${NEO4J_causalClustering_discoveryAdvertisedAddress:-"$(hostname):5000"}} | ||
: ${NEO4J_causal__clustering_transaction__advertised__address:=${NEO4J_causalClustering_transactionAdvertisedAddress:-"$(hostname):6000"}} | ||
: ${NEO4J_causal__clustering_raft__advertised__address:=${NEO4J_causalClustering_raftAdvertisedAddress:-"$(hostname):7000"}} | ||
# Custom settings for dockerized neo4j | ||
: ${NEO4J_ha_host_coordination:=$(hostname):5001} | ||
: ${NEO4J_ha_host_data:=$(hostname):6001} | ||
: ${NEO4J_causal__clustering_discovery__advertised__address:=$(hostname):5000} | ||
: ${NEO4J_causal__clustering_transaction__advertised__address:=$(hostname):6000} | ||
: ${NEO4J_causal__clustering_raft__advertised__address:=$(hostname):7000} | ||
fi | ||
: ${NEO4J_wrapper_java_additional:=-Dneo4j.ext.udc.source=docker} | ||
|
||
# unset old hardcoded unsupported env variables | ||
unset NEO4J_dbms_txLog_rotation_retentionPolicy NEO4J_UDC_SOURCE \ | ||
|
@@ -250,14 +258,6 @@ unset NEO4J_dbms_txLog_rotation_retentionPolicy NEO4J_UDC_SOURCE \ | |
NEO4J_causalClustering_raftListenAddress \ | ||
NEO4J_causalClustering_raftAdvertisedAddress | ||
|
||
# Custom settings for dockerized neo4j | ||
: ${NEO4J_wrapper_java_additional:=-Dneo4j.ext.udc.source=docker} | ||
: ${NEO4J_ha_host_coordination:=$(hostname):5001} | ||
: ${NEO4J_ha_host_data:=$(hostname):6001} | ||
: ${NEO4J_causal__clustering_discovery__advertised__address:=$(hostname):5000} | ||
: ${NEO4J_causal__clustering_transaction__advertised__address:=$(hostname):6000} | ||
: ${NEO4J_causal__clustering_raft__advertised__address:=$(hostname):7000} | ||
|
||
if [ -d /conf ]; then | ||
if secure_mode_enabled; then | ||
check_mounted_folder_readable "/conf" | ||
|
@@ -333,25 +333,40 @@ if [ "${cmd}" == "neo4j" ]; then | |
fi | ||
fi | ||
|
||
declare -A CONFIG | ||
declare -A COMMUNITY | ||
declare -A ENTERPRISE | ||
|
||
CONFIG=( | ||
COMMUNITY=( | ||
[dbms.tx_log.rotation.retention_policy]="100M size" | ||
[dbms.memory.pagecache.size]="512M" | ||
[dbms.connectors.default_listen_address]="0.0.0.0" | ||
[dbms.connector.https.listen_address]="0.0.0.0:7473" | ||
[dbms.connector.http.listen_address]="0.0.0.0:7474" | ||
[dbms.connector.bolt.listen_address]="0.0.0.0:7687" | ||
) | ||
|
||
ENTERPRISE=( | ||
[causal_clustering.transaction_listen_address]="0.0.0.0:6000" | ||
[causal_clustering.raft_listen_address]="0.0.0.0:7000" | ||
[causal_clustering.discovery_listen_address]="0.0.0.0:5000" | ||
) | ||
|
||
for conf in ${!CONFIG[@]} ; do | ||
for conf in ${!COMMUNITY[@]} ; do | ||
|
||
if ! grep -q "^$conf" "${NEO4J_HOME}"/conf/neo4j.conf | ||
then | ||
echo -e "\n"$conf=${CONFIG[$conf]} >> "${NEO4J_HOME}"/conf/neo4j.conf | ||
echo -e "\n"$conf=${COMMUNITY[$conf]} >> "${NEO4J_HOME}"/conf/neo4j.conf | ||
fi | ||
done | ||
|
||
for conf in ${!ENTERPRISE[@]} ; do | ||
|
||
if [ "${NEO4J_EDITION}" == "enterprise" ]; | ||
then | ||
if ! grep -q "^$conf" "${NEO4J_HOME}"/conf/neo4j.conf | ||
then | ||
echo -e "\n"$conf=${ENTERPRISE[$conf]} >> "${NEO4J_HOME}"/conf/neo4j.conf | ||
fi | ||
fi | ||
done | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you're missing the equivalent of this
for
for enterprise. Maybe a patching error?