mirror of
https://github.com/luzifer-docker/searx.git
synced 2024-11-08 11:10:02 +00:00
18 lines
497 B
Bash
18 lines
497 B
Bash
|
#!/usr/local/bin/dumb-init /bin/bash
|
||
|
set -euo pipefail
|
||
|
|
||
|
SECRET_KEY=${SECRET_KEY:-}
|
||
|
[[ -n ${SECRET_KEY} ]] || {
|
||
|
SECRET_KEY=$(openssl rand -hex 32)
|
||
|
echo "Attention: Secret key was auto-generated! You should"
|
||
|
echo "set it via SECRET_KEY env var to keep it persistent"
|
||
|
}
|
||
|
|
||
|
[[ -z ${BASE_URL:-} ]] || {
|
||
|
sed -i "s@base_url : False@base_url : '${BASE_URL}'@" searx/settings.yml
|
||
|
}
|
||
|
|
||
|
sed -i "s/secret_key : \"ultrasecretkey\"/secret_key : '${SECRET_KEY}'/" searx/settings.yml
|
||
|
|
||
|
exec python searx/webapp.py
|