mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 09:05:10 +00:00
commit
7cca81c700
4 changed files with 39 additions and 2 deletions
|
|
@ -201,6 +201,13 @@ elif [ "$1" = 'restore-backup' ]; then
|
||||||
&& python /home/frappe/frappe-bench/commands/restore_backup.py"
|
&& python /home/frappe/frappe-bench/commands/restore_backup.py"
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
elif [ "$1" = 'bench' ]; then
|
||||||
|
|
||||||
|
exec su frappe -c '/home/frappe/frappe-bench/env/bin/python \
|
||||||
|
/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py \
|
||||||
|
frappe "$@"'
|
||||||
|
exit
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
exec su frappe -c "$@"
|
exec su frappe -c "$@"
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@ RUN install_app [custom] https://github.com/[username]/[custom] [branch]
|
||||||
# Only add the branch if you are using a specific tag or branch.
|
# Only add the branch if you are using a specific tag or branch.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Note:** Replace `https://github.com/[username]/[custom]` above with your custom app's Git repository URL (may include credentials if needed). Your custom app Git repository **must** be named exactly as the custom app's name, and use the same branch name as Frappe/ERPNext branch name that you use.
|
||||||
|
|
||||||
Create a `Dockerfile` in `./build/[custom]-nginx` with the following content:
|
Create a `Dockerfile` in `./build/[custom]-nginx` with the following content:
|
||||||
|
|
||||||
```Dockerfile
|
```Dockerfile
|
||||||
|
|
@ -27,7 +29,7 @@ FROM bitnami/node:12-prod
|
||||||
|
|
||||||
COPY build/[custom]-nginx/install_app.sh /install_app
|
COPY build/[custom]-nginx/install_app.sh /install_app
|
||||||
|
|
||||||
RUN /install_app [custom] https://github.com/[username]/[custom]
|
RUN /install_app [custom] https://github.com/[username]/[custom] [branch]
|
||||||
|
|
||||||
FROM frappe/erpnext-nginx:edge
|
FROM frappe/erpnext-nginx:edge
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -203,3 +203,25 @@ Additional services can be pinged as part of health check with option `-p` or `-
|
||||||
|
|
||||||
This check ensures that given service should be connected along with services in common_site_config.json.
|
This check ensures that given service should be connected along with services in common_site_config.json.
|
||||||
If connection to service(s) fails, the command fails with exit code 1.
|
If connection to service(s) fails, the command fails with exit code 1.
|
||||||
|
|
||||||
|
## Frappe internal commands using bench helper
|
||||||
|
|
||||||
|
To execute commands using bench helper.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run \
|
||||||
|
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
|
||||||
|
--network <project-name>_default \
|
||||||
|
frappe/frappe-worker:$VERSION bench --help
|
||||||
|
```
|
||||||
|
|
||||||
|
Example command to clear cache
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker run \
|
||||||
|
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
|
||||||
|
--network <project-name>_default \
|
||||||
|
frappe/frappe-worker:$VERSION bench --site erp.mysite.com clear-cache
|
||||||
|
```
|
||||||
|
|
||||||
|
Use it to install/uninstall custom apps, add system manager user, etc.
|
||||||
|
|
|
||||||
|
|
@ -408,3 +408,9 @@ docker run \
|
||||||
-v frappebench00_sites-vol:/home/frappe/frappe-bench/sites \
|
-v frappebench00_sites-vol:/home/frappe/frappe-bench/sites \
|
||||||
--network frappebench00_default \
|
--network frappebench00_default \
|
||||||
frappe/erpnext-worker:edge console pgsql.localhost
|
frappe/erpnext-worker:edge console pgsql.localhost
|
||||||
|
|
||||||
|
echo -e "\e[1m\e[4mCheck bench --help\e[0m"
|
||||||
|
docker run \
|
||||||
|
-v frappebench00_sites-vol:/home/frappe/frappe-bench/sites \
|
||||||
|
--network frappebench00_default \
|
||||||
|
frappe/erpnext-worker:edge bench --help
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue