From d83a40154efbe935f27659c0fc8536683ecc3df7 Mon Sep 17 00:00:00 2001 From: Lev Vereshchagin Date: Tue, 8 Feb 2022 14:45:07 +0300 Subject: [PATCH] Run pre-commit on docs --- README.md | 14 +++++----- docs/add-custom-domain-using-traefik.md | 14 +++++----- docs/backup-and-push-cronjob.md | 2 +- docs/bench-console-and-vscode-debugger.md | 26 +++++++++---------- ...om-containers-for-local-app-development.md | 6 ++--- docs/docker-swarm.md | 1 + docs/setup-options.md | 1 + 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 4d7666e9..af05681c 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ Also, there's docs to help with deployment: - [Kubernetes (frappe/helm)](https://helm.erpnext.com), - [site operations](docs/site-operations.md). - Other - - [add custom domain using traefik](docs/add-custom-domain-using-traefik.md) - - [backup and push cron jobs](docs/backup-and-push-cronjob.md) - - [bench console and vscode debugger](docs/bench-console-and-vscode-debugger.md) - - [build version 10](docs/build-version-10-images.md) - - [connect to localhost services from containers for local app development](docs/connect-to-localhost-services-from-containers-for-local-app-development.md) - - [patch code from images](docs/patch-code-from-images.md) - - [port based multi tenancy](docs/port-based-multi-tenancy.md) + - [add custom domain using traefik](docs/add-custom-domain-using-traefik.md) + - [backup and push cron jobs](docs/backup-and-push-cronjob.md) + - [bench console and vscode debugger](docs/bench-console-and-vscode-debugger.md) + - [build version 10](docs/build-version-10-images.md) + - [connect to localhost services from containers for local app development](docs/connect-to-localhost-services-from-containers-for-local-app-development.md) + - [patch code from images](docs/patch-code-from-images.md) + - [port based multi tenancy](docs/port-based-multi-tenancy.md) - [Troubleshoot](docs/troubleshoot.md) # Custom app diff --git a/docs/add-custom-domain-using-traefik.md b/docs/add-custom-domain-using-traefik.md index fbea49a0..59299bec 100644 --- a/docs/add-custom-domain-using-traefik.md +++ b/docs/add-custom-domain-using-traefik.md @@ -1,13 +1,13 @@ Add following labels to `frontend` service ```yaml - traefik.http.routers.custom-domain.rule: Host(`custom.localhost`) - # Comment the entrypoints label if traefik already has default entrypoint set - traefik.http.routers.custom-domain.entrypoints: web - traefik.http.middlewares.custom-domain.headers.customrequestheaders.Host: mysite.localhost - traefik.http.routers.custom-domain.middlewares: custom-domain - # Add following header only if TLS is needed in case of live server - traefik.http.routers.custom-domain.tls.certresolver: main-resolver +traefik.http.routers.custom-domain.rule: Host(`custom.localhost`) +# Comment the entrypoints label if traefik already has default entrypoint set +traefik.http.routers.custom-domain.entrypoints: web +traefik.http.middlewares.custom-domain.headers.customrequestheaders.Host: mysite.localhost +traefik.http.routers.custom-domain.middlewares: custom-domain +# Add following header only if TLS is needed in case of live server +traefik.http.routers.custom-domain.tls.certresolver: main-resolver ``` Example: diff --git a/docs/backup-and-push-cronjob.md b/docs/backup-and-push-cronjob.md index bcb63b7b..aaee4406 100644 --- a/docs/backup-and-push-cronjob.md +++ b/docs/backup-and-push-cronjob.md @@ -37,10 +37,10 @@ volumes: networks: frappe-network: external: true - ``` Note: + - In Above stack, `backup` runs every 3 hours. - Change image and tag version as per need. - Change environment variables as per the bucket credentials. diff --git a/docs/bench-console-and-vscode-debugger.md b/docs/bench-console-and-vscode-debugger.md index f5d38864..b1668392 100644 --- a/docs/bench-console-and-vscode-debugger.md +++ b/docs/bench-console-and-vscode-debugger.md @@ -1,18 +1,16 @@ Add the following configuration to `launch.json` `configurations` array to start bench console and use debugger. Replace `mysite.localhost` with appropriate site. Also replace `frappe-bench` with name of the bench directory. ```json - { - "name": "Bench Console", - "type": "python", - "request": "launch", - "program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", - "args": [ - "frappe", "--site", "mysite.localhost", "console" - ], - "pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python", - "cwd": "${workspaceFolder}/frappe-bench/sites", - "env": { - "DEV_SERVER": "1" - } - } +{ + "name": "Bench Console", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", + "args": ["frappe", "--site", "mysite.localhost", "console"], + "pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python", + "cwd": "${workspaceFolder}/frappe-bench/sites", + "env": { + "DEV_SERVER": "1" + } +} ``` diff --git a/docs/connect-to-localhost-services-from-containers-for-local-app-development.md b/docs/connect-to-localhost-services-from-containers-for-local-app-development.md index 73ee06ae..4f151937 100644 --- a/docs/connect-to-localhost-services-from-containers-for-local-app-development.md +++ b/docs/connect-to-localhost-services-from-containers-for-local-app-development.md @@ -2,9 +2,9 @@ Not using separate container Add following to frappe container from the `.devcontainer/docker-compose.yml`: ```yaml - extra_hosts: - app1.localhost: 172.17.0.1 - app2.localhost: 172.17.0.1 +extra_hosts: + app1.localhost: 172.17.0.1 + app2.localhost: 172.17.0.1 ``` This is makes the domain names `app1.localhost` and `app2.localhost` connect to docker host and connect to services running on `localhost`. diff --git a/docs/docker-swarm.md b/docs/docker-swarm.md index e1c47177..1efb5177 100644 --- a/docs/docker-swarm.md +++ b/docs/docker-swarm.md @@ -45,6 +45,7 @@ Commands explained: - `yq eval ".\"networks\"={\"traefik-public\":{\"external\":true}}"`, this commands adds external network `traefik-public` to the stack Notes: + - Set `BENCH_SUFFIX` to the stack name. the stack will be located at `~/gitops/compose-${BENCH_SUFFIX}.yaml`. - `traefik-public` is assumed to be the network for traefik loadbalancer for swarm. - Once the stack YAML is generated, you can edit it further for advance setup and commit it to your gitops diff --git a/docs/setup-options.md b/docs/setup-options.md index f2fcb8ec..c19555fc 100644 --- a/docs/setup-options.md +++ b/docs/setup-options.md @@ -52,6 +52,7 @@ docker-compose -f compose.yaml \ # Start containers docker-compose --project -f ~/gitops/docker-compose.yml up -d ``` + ### Setup ERPNext using containerized MariaDB and Redis with Letsencrypt certificates. ```sh