2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-09-20 19:19:02 +00:00
frappe_docker/build/worker/entrypoint.sh
2021-12-14 15:33:37 +03:00

27 lines
577 B
Bash
Executable File

#!/bin/bash
# TODO: Set config dynamically, so changes in compose file have affect
set -e
function create_common_site_config() {
if [[ ! -f common_site_config.json ]]; then
config=$(
cat <<EOF
{
"db_host": "${DB_HOST}",
"db_port": ${DB_PORT},
"redis_cache": "redis://${REDIS_CACHE}",
"redis_queue": "redis://${REDIS_QUEUE}",
"redis_socketio": "redis://${REDIS_SOCKETIO}",
"socketio_port": ${SOCKETIO_PORT}
}
EOF
)
echo "$config" >/home/frappe/frappe-bench/sites/common_site_config.json
fi
}
create_common_site_config
exec "$@"