2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 23:00:56 +00:00
frappe_docker/docs/patch-code-from-images.md
Revant Nandgaonkar e362c26fc1
docs: improve and organize docs (#791)
* docs: improve and organize docs

* docs: improve setup options
2022-05-02 05:47:53 +05:30

35 lines
930 B
Markdown

Example: https://discuss.erpnext.com/t/sms-two-factor-authentication-otp-msg-change/47835
Above example needs following Dockerfile based patch
```Dockerfile
FROM frappe/erpnext-worker:v12.17.0
...
USER root
RUN sed -i -e "s/Your verification code is/আপনার লগইন কোড/g" /home/frappe/frappe-bench/apps/frappe/frappe/twofactor.py
USER frappe
...
```
Example for `nginx` image,
```Dockerfile
FROM frappe/erpnext-nginx:v13.27.0
# Hack to use Frappe/ERPNext offline.
RUN sed -i 's/navigator.onLine/navigator.onLine||true/' \
/usr/share/nginx/html/assets/js/desk.min.js \
/usr/share/nginx/html/assets/js/dialog.min.js \
/usr/share/nginx/html/assets/js/frappe-web.min.js
```
Alternatively copy the modified source code file directly over `/home/frappe/frappe-bench/apps/frappe/frappe/twofactor.py`
```Dockerfile
...
COPY twofactor.py /home/frappe/frappe-bench/apps/frappe/frappe/twofactor.py
...
```