mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-17 13:55:08 +00:00
fix: embed entrypoint for layered image
This commit is contained in:
parent
5cdd428a66
commit
799aa4e561
1 changed files with 15 additions and 2 deletions
|
|
@ -46,8 +46,21 @@ VOLUME [ \
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
# This entrypoint script link build assets of the image to the mounted sites volume at container initialization
|
# This entrypoint script link build assets of the image to the mounted sites volume at container initialization
|
||||||
COPY resources/core/main-entrypoint.sh /usr/local/bin/entrypoint.sh
|
RUN cat <<'EOF' > /usr/local/bin/entrypoint.sh \
|
||||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
&& chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
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 "$@"
|
||||||
|
EOF
|
||||||
|
|
||||||
USER frappe
|
USER frappe
|
||||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue