Hi,
I would like to build a custom Docker image to inject certificates via environment variables and hence have a custom entrypoint, what command should I use at the end to start Neo4j?
#!/bin/sh
echo "Starting....."
mkdir -p /var/lib/neo4j/certificates/https/
if [ -n "$NEO4J_TLS_CA_CONTENT" ]; then
if echo "$NEO4J_TLS_CA_CONTENT" | head -n 1 | grep -q "^----"; then
echo "$NEO4J_TLS_CA_CONTENT" > /var/lib/neo4j/certificates/https/ca.ca
else
echo "$NEO4J_TLS_CA_CONTENT" | base64 -d > /var/lib/neo4j/certificates/https/ca.ca
fi
export NEO4J_TLS_CAFILEPATH=/var/lib/neo4j/certificates/https/ca.pem
fi
if [ -n "$NEO4J_TLS_CERT_CONTENT" ]; then
if echo "$NEO4J_TLS_CERT_CONTENT" | head -n 1 | grep -q "^----"; then
echo "$NEO4J_TLS_CERT_CONTENT" > /var/lib/neo4j/certificates/https/public.crt
else
echo "$NEO4J_TLS_CERT_CONTENT" | base64 -d > /var/lib/neo4j/certificates/https/public.crt
fi
export NEO4J_TLS_CERTFILEPATH=/var/lib/neo4j/certificates/https/public.pem
fi
if [ -n "$NEO4J_TLS_KEY_CONTENT" ]; then
if echo "$NEO4J_TLS_KEY_CONTENT" | head -n 1 | grep -q "^----"; then
echo "$NEO4J_TLS_KEY_CONTENT" > /var/lib/neo4j/certificates/https/private.key
else
echo "$NEO4J_TLS_KEY_CONTENT" | base64 -d > /var/lib/neo4j/certificates/https/private.key
fi
export NEO4J_TLS_KEYFILEPATH=/var/lib/neo4j/certificates/https/private.pem
fi
echo "🚀 Starting Neo4j..."
# What command to execute here to start Neo4j ?