Merge pull request #336 from frappe/develop

Release v13.0.0-beta.5
This commit is contained in:
Revant Nandgaonkar 2020-08-13 23:56:10 +05:30 committed by GitHub
commit 7cca81c700
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 2 deletions

View file

@ -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 "$@"

View file

@ -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
@ -53,4 +55,4 @@ Open up `./installation/docker-compose-custom.yml` and replace all instances of
sed -i "s#\[app\]#[custom]#" ./installation/docker-compose-custom.yml sed -i "s#\[app\]#[custom]#" ./installation/docker-compose-custom.yml
``` ```
Install like usual, except that when you set the `INSTALL_APPS` variable to `erpnext,[custom]`. Install like usual, except that when you set the `INSTALL_APPS` variable to `erpnext,[custom]`.

View file

@ -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.

View file

@ -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