frappe_docker_380b9d0_20260902/resources/core/main-entrypoint.sh

21 lines
436 B
Bash
Executable File

#!/bin/bash
set -e
umask 0002
if ! whoami &>/dev/null; then
if [ -w /etc/passwd ]; then
echo "frappe:x:$(id -u):0:frappe user:${HOME:-/home/frappe}:/bin/bash" >>/etc/passwd
fi
fi
ASSETS_PATH="/home/frappe/frappe-bench/sites/assets"
BAKED_PATH="/home/frappe/frappe-bench/assets"
echo "Linking fresh assets to volume..."
rm -rf "$ASSETS_PATH"
mkdir -p "$(dirname "$ASSETS_PATH")"
ln -s "$BAKED_PATH" "$ASSETS_PATH"
exec "$@"