2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-10 15:20:55 +00:00
frappe_docker/build/worker/entrypoint.sh
2021-12-15 10:06:49 +03:00

25 lines
505 B
Bash
Executable File

#!/bin/bash
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 "$@"