fix: add entrypoint to worker

symlinks frappe node_modules from sites/assets to apps/frappe
This commit is contained in:
Revant Nandgaonkar 2022-03-15 05:03:52 +05:30
parent 437afb1776
commit fc970f9700
2 changed files with 13 additions and 0 deletions

View file

@ -102,9 +102,12 @@ COPY pretend-bench.sh /usr/local/bin/bench
COPY push_backup.py /usr/local/bin/push-backup
COPY configure.py patched_bench_helper.py /usr/local/bin/
COPY gevent_patch.py /opt/patches/
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
WORKDIR /home/frappe/frappe-bench/sites
ENTRYPOINT [ "entrypoint.sh" ]
CMD [ "/home/frappe/frappe-bench/env/bin/gunicorn", "-b", "0.0.0.0:8000", "frappe.app:application" ]

10
images/worker/entrypoint.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
set -e
# Link Frappe's node_modules/ to make Website Theme work
if test -d /home/frappe/frappe-bench/sites/assets/frappe/node_modules; then
ln -sfn /home/frappe/frappe-bench/sites/assets/frappe/node_modules /home/frappe/frappe-bench/apps/frappe/node_modules
fi
exec "$@"