1018 Commits

Author SHA1 Message Date
seangjr
ab95e01e2c chore: refine email and site entries in example.env
Some checks failed
Lint / lint (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Develop build / build (push) Has been cancelled
Bench / build (push) Has been cancelled
Autoupdate pre-commit hooks / pre-commit-autoupdate (push) Has been cancelled
2025-10-16 00:25:35 +08:00
seangjr
884eac6294 chore: update email and site list in example.env
Some checks failed
Lint / lint (push) Has been cancelled
Stable build / v14 (push) Has been cancelled
Stable build / v15 (push) Has been cancelled
Stable build / Update example.env and pwd.yml (push) Has been cancelled
Stable build / Release Helm (push) Has been cancelled
2025-10-16 00:05:50 +08:00
github-actions
828a7db833 chore: Update example.env 2025-10-14 14:36:46 +00:00
DanielRadlAMR
ffd2aa47a6 docs: reorganize container setup information into new subfolder docs/container-setup (#1720) 2025-10-14 17:31:25 +05:30
jobafr
5b8cbd3aee add correct redis URLs to environment of other containers (#1718) 2025-10-14 17:28:18 +05:30
github-actions
c6511f1453 chore: Update example.env 2025-10-08 15:05:10 +00:00
github-actions
2aed90d861 chore: Update example.env 2025-10-07 13:51:24 +00:00
github-actions
f44a226c17 chore: Update example.env 2025-10-06 15:18:47 +00:00
github-actions
9fec5ae4a5 chore: Update example.env 2025-10-06 04:28:53 +00:00
github-actions
e6a1b77853 chore: Update example.env 2025-10-01 15:28:21 +00:00
github-actions
839fba5043 chore: Update example.env 2025-09-30 13:42:01 +00:00
DanielRadlAMR
72b8d262c9 chore(deps): update MariaDB to v11.8 (LTS) (#1715)
* chore(deps): update MariaDB to v11.8 (LTS)

* fix(mariadb): replaced deprecated mysqladmin

* feat(mariadb): make use of healthcheck.sh
2025-09-29 11:37:17 +05:30
github-actions
1688a55d93 chore: Update example.env 2025-09-25 15:19:46 +00:00
github-actions
3b55b49cf8 chore: Update example.env 2025-09-23 14:07:48 +00:00
Niklas Liechti
8b523ca125 Improve devcontainer behaviour on ARM Macs (#1707)
* Remove hardcoded amd64 images. This slows down development on ARM Macs significantly.

* Do not use prebuilt bench image as it may be outdated or not available as an ARM build.
The source image is in this repo anyway.

* Use the prebuilt image by default.
2025-09-23 13:30:48 +05:30
github-actions
0c59c8475c chore: Update example.env 2025-09-23 07:48:35 +00:00
github-actions
c2679e20c3 chore: Update example.env 2025-09-21 19:07:12 +00:00
Samar Singh
32f4fd315f Fix: Update PostgreSQL 11.8 → 14 for Frappe Site Creation (#1709)
* update version of postgress in compose.yml file

* fix(postgres): upgrade to v14 for COMMIT AND CHAIN support

---------

Co-authored-by: abhirock74 <abhishek.suvaidyam@gmail.com>
2025-09-18 04:43:41 +05:30
github-actions
67500fa79a chore: Update example.env 2025-09-16 15:14:11 +00:00
Marc Ramser
f8f806b3a7 Upgrade node version (#1706) 2025-09-16 12:39:26 +05:30
MeIchthys
b6e89163ec Revert "Use docker compose instead of docker-compose (#1702)" (#1708)
This reverts commit 2f5a42d864.
2025-09-16 08:19:27 +05:30
MeIchthys
2f5a42d864 Use docker compose instead of docker-compose (#1702)
* Use `docker compose` instead of `docker-compose`

Update to use new docker syntax.

* use `docker` instead of `docker-compose`
2025-09-13 12:24:41 +05:30
dependabot[bot]
6e78467603 chore(deps): bump pytest from 8.4.1 to 8.4.2 (#1694)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.4.1 to 8.4.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.4.1...8.4.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 8.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 07:30:37 +05:30
dependabot[bot]
2f65520e14 chore(deps): bump actions/stale from 9 to 10 (#1693)
Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 07:30:06 +05:30
dependabot[bot]
c2fb2055f0 chore(deps): bump actions/setup-python from 5 to 6 (#1692)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 07:29:33 +05:30
dependabot[bot]
520b00ac1b chore(deps): bump actions/setup-go from 5 to 6 (#1691)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 07:29:03 +05:30
github-actions
06fbff626e chore: Update example.env 2025-09-04 15:11:02 +00:00
github-actions
e66f6b5042 chore: Update example.env 2025-09-02 14:22:03 +00:00
dependabot[bot]
e642a804ca chore(deps): bump docker/bake-action from 6.8.0 to 6.9.0 (#1681)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.8.0 to 6.9.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.8.0...v6.9.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-version: 6.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-29 05:37:31 +05:30
Jared Nay
8782363a88 Add extra detail to line 33 of README.md to improve user accessibility. (#1675) 2025-08-29 05:36:45 +05:30
dependabot[bot]
fb8a5e133b chore(deps): bump actions/checkout from 4 to 5 (#1677)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-29 05:36:27 +05:30
github-actions
821143d2e4 chore: Update example.env 2025-08-26 12:08:02 +00:00
github-actions
86371d37fe chore: Update example.env 2025-08-19 12:26:04 +00:00
github-actions
443fc5f04d chore: Update example.env 2025-08-14 06:36:11 +00:00
github-actions
0801e2f424 chore: Update example.env 2025-08-12 12:34:55 +00:00
github-actions
4e863726e4 chore: Update example.env 2025-08-08 09:53:49 +00:00
github-actions
73eba8cb50 chore: Update example.env 2025-08-07 11:36:36 +00:00
github-actions
1f46f9798c chore: Update example.env 2025-08-06 12:56:34 +00:00
github-actions
a8f674b7b1 chore: Update example.env 2025-08-06 03:09:02 +00:00
github-actions
a45d1ba288 chore: Update example.env 2025-08-03 11:15:00 +00:00
github-actions
d7d2cab9fc chore: Update example.env 2025-08-01 10:58:33 +00:00
github-actions
a7295c6c96 chore: Update example.env 2025-07-31 11:37:48 +00:00
github-actions
7a3d99a034 chore: Update example.env 2025-07-29 15:44:58 +00:00
github-actions
a00159406f chore: Update example.env 2025-07-24 02:13:06 +00:00
DanielRadlAMR
8841d78c13 Add Docker Secrets Support for Database Password & fixed missing boto3 dependency in tests (#1657)
* Added overrider to use docker secrets for mariadb password

* typo in overrider file name

* typo in overrider mariadb-secrets

* typo in overriider mariadb-secrets

* Secrets enviroment variable override

* secrets need different enviroment variable name

* no - for env variables

* Updated deprecated MinIO Env Variables

* refactored to be more robust and better error handling

* temprary debugging changes

* Revert "temprary debugging changes"

This reverts commit d01931064d.

* Revert "refactored to be more robust and better error handling"

This reverts commit fe508668a8.

* Revert "Updated deprecated MinIO Env Variables"

This reverts commit 76e66b5262.

* manually added boto3 before running _create_bucket

* lint formatting
2025-07-19 08:27:10 +05:30
YapWC
d505c91eab Update Install Traefik Section (#1664)
Since the password would be parsed in single quote (') the text transformation is no longer needed. This update is based on issue #1002 (Unable to login to Traefik Dashboard even after providing Correct password in Basic Auth.)
2025-07-19 08:24:05 +05:30
github-actions
6a04aa9131 chore: Update example.env 2025-07-17 11:50:51 +00:00
github-actions
efe789bad1 chore: Update example.env 2025-07-16 15:42:26 +00:00
github-actions
8e404464c3 chore: Update example.env 2025-07-15 13:23:39 +00:00
github-actions
84d3730699 chore: Update example.env 2025-07-11 10:28:22 +00:00
github-actions
02dca77af7 chore: Update example.env 2025-07-09 15:50:14 +00:00
github-actions
c9feb00532 chore: Update example.env 2025-07-08 13:27:14 +00:00
bgodlin
f2bf8cf10f chore: Add configuration for Bench Default Worker in launch.json (#1652)
* chore: Add configuration for Bench Default Worker in launch.json

* chore: fix pre-commit lint

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2025-07-04 11:22:35 +05:30
github-actions
80aa2bbd4f chore: Update example.env 2025-07-01 12:32:34 +00:00
dependabot[bot]
fcff548b87 chore(deps): bump pytest from 8.4.0 to 8.4.1 (#1649)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.4.0 to 8.4.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.4.0...8.4.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 8.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 08:44:32 +05:30
github-actions
6e8f953607 chore: Update example.env 2025-06-27 13:02:37 +00:00
github-actions
f4f6e75145 chore: Update example.env 2025-06-25 05:20:34 +00:00
github-actions
4b6dbb64df chore: Update example.env 2025-06-19 17:06:12 +00:00
github-actions
514480d156 chore: Update example.env 2025-06-19 06:02:20 +00:00
github-actions
ce36b51e81 chore: Update example.env 2025-06-17 15:09:57 +00:00
github-actions
a92deb6cc5 chore: Update example.env 2025-06-11 13:23:07 +00:00
github-actions
920639956d chore: Update example.env 2025-06-10 15:04:17 +00:00
dependabot[bot]
729edc67c1 chore(deps): bump pytest from 8.3.5 to 8.4.0 (#1644)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.5 to 8.4.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.5...8.4.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-version: 8.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-09 07:53:27 +05:30
github-actions
b1f25de9c3 chore: Update example.env 2025-06-06 07:40:00 +00:00
github-actions
c187ec55a4 chore: Update example.env 2025-06-03 12:26:45 +00:00
dependabot[bot]
ebd8021730 chore(deps): bump docker/bake-action from 6.7.0 to 6.8.0 (#1641)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.7.0 to 6.8.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.7.0...v6.8.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-version: 6.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-29 17:33:43 +05:30
gp
31ed5daa68 chore: Update EOL NodeJS to 20.19.2 (#1638) 2025-05-29 17:33:28 +05:30
github-actions
b2c02427c9 chore: Update example.env 2025-05-27 15:46:50 +00:00
dependabot[bot]
1aeff70c96 chore(deps): bump docker/bake-action from 6.6.0 to 6.7.0 (#1633)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.6.0 to 6.7.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.6.0...v6.7.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-version: 6.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-23 12:50:11 +05:30
github-actions
7158cba6eb chore: Update example.env 2025-05-20 14:42:57 +00:00
github-actions
6f90142716 chore: Update example.env 2025-05-15 06:54:55 +00:00
Harmeet Singh
65a0ac2e7f Update site-operations.md (#1627)
Added note for -p <project_name> in docker-compose exec command.

https://github.com/frappe/frappe_docker/issues/927
2025-05-13 22:07:44 +05:30
github-actions
340e09d248 chore: Update example.env 2025-05-13 14:52:00 +00:00
github-actions
e104c0b4ea chore: Update example.env 2025-05-06 15:02:16 +00:00
dependabot[bot]
aa4ae4d183 chore(deps): bump docker/bake-action from 6.5.0 to 6.6.0 (#1619)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.5.0 to 6.6.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.5.0...v6.6.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-version: 6.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-05 13:24:06 +05:30
github-actions
7d4d0b18f4 chore: Update example.env 2025-05-02 14:34:01 +00:00
github-actions
2e7322f23d chore: Update example.env 2025-04-29 13:58:40 +00:00
github-actions
901a30b124 chore: Update example.env 2025-04-22 14:36:09 +00:00
Md Hussain Nagaria
0f57e9815e chore: change short link 2025-04-21 18:27:22 +02:00
github-actions
3d7fc5378e chore: Update example.env 2025-04-17 11:44:27 +00:00
github-actions
eb249f13a0 chore: Update example.env 2025-04-16 06:05:05 +00:00
github-actions
b29e703427 chore: Update example.env 2025-04-16 04:51:55 +00:00
github-actions
2743ed1f67 chore: Update example.env 2025-04-14 09:13:54 +00:00
github-actions
28d6a2de15 chore: Update example.env 2025-04-13 15:03:20 +00:00
Reuel Ramos Ribeiro
b5cfe3f735 chore: Update vscode-example scripts (#1613)
* chore: Add tasks.json file

* refactor: Remove deprecated pythonPath; redundant with settings.json anyway.

* fix: Use expected type for python debug

* feat: Run post clean task in seamless way

* feat: Add compunds config for easier setup

* style: Trigger pre-commit lint

* fix: honcho python environment in vscode launch.json

* fix: pre-commit prettier check

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2025-04-12 11:06:57 +05:30
github-actions
bd8912c90d chore: Update example.env 2025-04-12 02:54:12 +00:00
github-actions
ccd095535b chore: Update example.env 2025-04-11 16:06:24 +00:00
github-actions
ab3d378b7d chore: Update example.env 2025-04-11 13:13:09 +00:00
github-actions
c5b065e9f1 chore: Update example.env 2025-04-10 08:22:22 +00:00
github-actions
e4a97a9e11 chore: Update example.env 2025-04-08 13:56:14 +00:00
github-actions
07de17ea89 chore: Update example.env 2025-04-07 06:03:33 +00:00
Reuel Ramos Ribeiro
e6f7deec5c Update development.md (#1600)
Clarify documentation about error. Solution was found at: https://discuss.frappe.io/t/youre-attempting-to-install-erpnext-version-15-with-frappe-version-16-this-is-not-supported-and-wi/127422
2025-04-01 16:32:19 +05:30
github-actions
0742a29105 chore: Update example.env 2025-03-29 20:57:46 +00:00
github-actions
1ac237df49 chore: Update example.env 2025-03-29 07:53:58 +00:00
github-actions
3b8fc30eb6 chore: Update example.env 2025-03-27 06:56:13 +00:00
github-actions
e4ecbb396a chore: Update example.env 2025-03-27 04:35:37 +00:00
github-actions
c6f687f253 chore: Update example.env 2025-03-25 14:41:56 +00:00
github-actions
973eafff69 chore: Update example.env 2025-03-19 11:54:45 +00:00
dependabot[bot]
509de1f49f chore(deps): bump webfactory/ssh-agent from 0.8.0 to 0.9.1 (#1592)
Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.8.0 to 0.9.1.
- [Release notes](https://github.com/webfactory/ssh-agent/releases)
- [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webfactory/ssh-agent/compare/v0.8.0...v0.9.1)

---
updated-dependencies:
- dependency-name: webfactory/ssh-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-19 07:24:13 +05:30
Revant Nandgaonkar
02e24c9d2d build: add pkg-config deb package in build layer (#1590)
* build: add pkg-config deb package in build layer

* ci: only use tonistiigi/binfmt for image push

* revert: arm64 builds

* ci: copy build_bench to docker-build-push

* ci: set driver-opts network=host for buildx action
2025-03-15 19:07:33 +05:30
Revant Nandgaonkar
1e0fba9959 ci: for arm64 build frappe/erpnext like frappe/bench (#1587) 2025-03-13 14:03:55 +05:30
github-actions
9601c1615e chore: Update example.env 2025-03-12 14:47:09 +00:00
github-actions
ffb4369af8 chore: Update example.env 2025-03-09 11:13:50 +00:00
github-actions
636e325006 chore: Update example.env 2025-03-08 07:51:45 +00:00
github-actions
a9095fc46a chore: Update example.env 2025-03-06 11:14:58 +00:00
github-actions
2ee921f2b3 chore: Update example.env 2025-03-05 13:37:46 +00:00
dependabot[bot]
f4c3b8024b chore(deps): bump pytest from 8.3.4 to 8.3.5 (#1581)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.4 to 8.3.5.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.4...8.3.5)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 15:52:54 +05:30
github-actions
5bc7e46009 chore: Update example.env 2025-03-03 05:21:09 +00:00
github-actions
4288aad11c chore: Update example.env 2025-03-03 04:11:37 +00:00
Hoa "Rin" Nguyen
d43a93adbb docs: fix typo yaml -> yml in README.md (#1579) 2025-03-02 17:48:12 +05:30
dependabot[bot]
8cfbbbb1e9 chore(deps): bump docker/bake-action from 6.4.0 to 6.5.0 (#1577)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.4.0 to 6.5.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.4.0...v6.5.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-28 12:57:10 +05:30
github-actions[bot]
0c78566fe9 chore(deps): Update pre-commit hooks (#1576)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2025-02-28 12:56:36 +05:30
github-actions
6382fa3d81 chore: Update example.env 2025-02-26 13:07:58 +00:00
bgodlin
bff029dca3 Fix installer.py (#1571)
* Update installer.py

Revising the `installer.py` script. The script is facing an issue during execution as it required interactive input for the root username unless the username was provided as a flag 42f9e537d0/frappe/installer.py (L157-L158). Resolving this by passing the username as a flag allows the script to proceed successfully.

* ci: pin pre-commit/prettier to 3.5.2

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2025-02-23 11:52:37 +05:30
dependabot[bot]
f069cffa5d chore(deps): bump docker/bake-action from 6.3.0 to 6.4.0 (#1570)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.3.0...v6.4.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-21 17:01:56 +05:30
github-actions
a71dc70ed7 chore: Update example.env 2025-02-21 10:11:32 +00:00
github-actions
c413fa8fa0 chore: Update example.env 2025-02-19 11:58:41 +00:00
DanielRadlAMR
b904b2b8f7 Compose with restart (#1567)
* added restart policy for critical sirvices

* Update configurator restart policy

* Added restart policy

* Added restart policy

* Added restart policy
2025-02-15 12:03:57 +05:30
github-actions
f6a5d22334 chore: Update example.env 2025-02-12 12:17:34 +00:00
github-actions
0b3846bbb1 chore: Update example.env 2025-02-10 16:37:53 +00:00
github-actions
fcd69663cd chore: Update example.env 2025-02-07 14:31:56 +00:00
github-actions
fc955779f0 chore: Update example.env 2025-02-05 12:17:15 +00:00
Amanuel Elhanan
56e1da3f37 Autostart pod on system boot (#1561)
* Autostart pod on system boot

* ci: fix pre-commit

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2025-02-04 18:48:44 +05:30
github-actions
8cf986b855 chore: Update example.env 2025-02-04 10:33:02 +00:00
github-actions[bot]
324aa43f0a chore(deps): Update pre-commit hooks (#1558)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2025-01-29 18:35:05 +05:30
github-actions
e941d775fd chore: Update example.env 2025-01-29 11:38:56 +00:00
kelvine
fcfe63e0df Update custom-apps.md (#1554)
* Update custom-apps.md

grammar fixes

* Remove redis-cache volume (#1555)

* Remove redis-cache volume

* remove from docs

* ci: fix pre-commit

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>

---------

Co-authored-by: Salah Aldin Fateh <83924106+sdfateh@users.noreply.github.com>
Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2025-01-27 11:13:47 +05:30
Salah Aldin Fateh
bcb203551a Remove redis-cache volume (#1555)
* Remove redis-cache volume

* remove from docs

* ci: fix pre-commit

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2025-01-27 11:10:14 +05:30
dependabot[bot]
23adfd300f chore(deps): bump docker/bake-action from 6.2.0 to 6.3.0 (#1553)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-25 17:20:37 +05:30
github-actions[bot]
85acfce1b4 chore(deps): Update pre-commit hooks (#1551)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2025-01-25 17:19:56 +05:30
Md Hussain Nagaria
40f07e2172 fix: pwd SocketIO Origin in nginx conf (#1552) 2025-01-24 12:36:30 +05:30
github-actions
24e5f192d5 chore: Update example.env 2025-01-24 05:24:00 +00:00
github-actions
ee265de548 chore: Update example.env 2025-01-23 08:53:35 +00:00
github-actions
1b28aba233 chore: Update example.env 2025-01-22 09:27:43 +00:00
github-actions
e4a9d34fff chore: Update example.env 2025-01-22 03:43:16 +00:00
dependabot[bot]
32ed7a8ff6 chore(deps): bump docker/bake-action from 6.1.1 to 6.2.0 (#1550)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.1.1 to 6.2.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.1.1...v6.2.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-17 09:34:26 +05:30
dependabot[bot]
3d564658ac chore(deps): bump docker/bake-action from 6.0.0 to 6.1.1 (#1548)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6.0.0 to 6.1.1.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6.0.0...v6.1.1)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-16 04:49:12 +05:30
github-actions
ee3b772836 chore: Update example.env 2025-01-15 12:39:07 +00:00
github-actions
266e35bf5d chore: Update example.env 2025-01-13 08:30:35 +00:00
Revant Nandgaonkar
c189099a27 Merge pull request #1545 from revant/fix-ci-bake-action
ci: use source for bake-action path context
2025-01-11 13:21:29 +05:30
Revant Nandgaonkar
0eaf7c8593 ci: use source for bake-action path context 2025-01-11 13:14:04 +05:30
Revant Nandgaonkar
183287786d Merge pull request #1544 from frappe/dependabot/github_actions/docker/bake-action-6.0.0
chore(deps): bump docker/bake-action from 5.11.0 to 6.0.0
2025-01-11 13:10:25 +05:30
dependabot[bot]
3d84e9bce2 chore(deps): bump docker/bake-action from 5.11.0 to 6.0.0
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.11.0 to 6.0.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.11.0...v6.0.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-10 08:30:09 +00:00
github-actions
92ce36dbb8 chore: Update example.env 2025-01-10 06:41:18 +00:00
github-actions
e8e70bfbda chore: Update example.env 2025-01-09 09:41:12 +00:00
github-actions
a173749da5 chore: Update example.env 2025-01-08 10:37:57 +00:00
Revant Nandgaonkar
fa8fd9453b Merge pull request #1542 from FulanoD3Tal/main
Update troubleshoot.md for edge cases
2025-01-08 04:04:03 +05:30
Roberto Alonso De la Garza Mendoza
dfcbe3fc22 Update troubleshoot.md for edge cases
Add create command template on troubleshoot.md
2025-01-07 12:34:55 -06:00
Revant Nandgaonkar
cb3cf80e1a Merge pull request #1539 from elhananjair/patch-2
Building an image with custom apps using podman
2025-01-06 17:48:44 +05:30
Revant Nandgaonkar
acb08c5179 docs: custom apps with podman 2025-01-06 17:47:10 +05:30
Revant Nandgaonkar
358409a2b8 Merge pull request #1538 from elhananjair/patch-1
Configuration of ERPNext access through https on localhost deployment
2025-01-06 17:42:21 +05:30
Revant Nandgaonkar
b8354030c5 docs: tls for local deployment 2025-01-06 17:41:32 +05:30
github-actions
fc57afe7f4 chore: Update example.env 2025-01-06 04:52:19 +00:00
Amanuel Elhanan
869de6218b Create custom-apps-podman
This is a full guide on building an image with custom apps using Podman.
2025-01-05 15:45:40 +03:00
Amanuel Elhanan
b75ac559e9 Create https for local ERPNext deployment.md 2025-01-05 14:16:55 +03:00
github-actions
9777d1b31a chore: Update example.env 2025-01-03 01:31:05 +00:00
github-actions
6c38b5e4ca chore: Update example.env 2025-01-01 10:10:29 +00:00
github-actions
905cb6260f chore: Update example.env 2025-01-01 08:46:22 +00:00
github-actions
d048f2b0e3 chore: Update example.env 2024-12-26 06:12:13 +00:00
Revant Nandgaonkar
83ec7d14f3 Merge pull request #1534 from revant/fix-cron-user
fix: backup cron user
2024-12-25 11:41:34 +05:30
Revant Nandgaonkar
d7ac519e28 fix: backup cron user 2024-12-25 11:28:22 +05:30
github-actions
576370f507 chore: Update example.env 2024-12-25 03:44:01 +00:00
github-actions
4dbee898cb chore: Update example.env 2024-12-23 06:28:19 +00:00
Revant Nandgaonkar
a9c765956c Merge pull request #1532 from revant/cron
feat: backup cron
2024-12-22 15:18:33 +05:30
Revant Nandgaonkar
32569fbef2 feat: backup cron 2024-12-22 14:29:14 +05:30
github-actions
f2ea9a9d74 chore: Update example.env 2024-12-18 09:17:40 +00:00
github-actions
bf1cff8777 chore: Update example.env 2024-12-18 05:42:04 +00:00
Revant Nandgaonkar
d2dbe004ce Merge pull request #1530 from frappe/pre-commit-autoupdate
chore(deps): Update pre-commit hooks
2024-12-17 14:46:54 +05:30
vrslev
a94c419aba chore(deps): Update pre-commit hooks 2024-12-17 07:02:09 +00:00
github-actions
d8b6b6bcd5 chore: Update example.env 2024-12-12 10:46:58 +00:00
Revant Nandgaonkar
70d35f152a Merge pull request #1526 from 0xD0M1M0/main
* fix: --no-mariadb-socket & --mariadb-root-password is DEPRECATED

* fix: quote percent as mentioned in bench help

* revert: quote percent as mentioned in bench help

* fix: tests

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2024-12-11 09:13:12 +05:30
Revant Nandgaonkar
65c4f28ffd fix: tests 2024-12-10 16:26:59 +05:30
Vlad Sorokin
46c213b1c8 fix: add quotes into command (#1527) 2024-12-10 16:13:28 +05:30
Revant Nandgaonkar
85e164f34c revert: quote percent as mentioned in bench help 2024-12-10 15:48:00 +05:30
Revant Nandgaonkar
1505d125f1 fix: quote percent as mentioned in bench help 2024-12-10 15:36:18 +05:30
github-actions
13db302a08 chore: Update example.env 2024-12-08 11:10:57 +00:00
github-actions
c9aa1f179a chore: Update example.env 2024-12-08 09:33:09 +00:00
0xD0M1M0
598c7dab43 fix: --no-mariadb-socket & --mariadb-root-password is DEPRECATED 2024-12-07 15:30:46 +01:00
0xD0M1M0
beecd99686 fix: --no-mariadb-socket is DEPRECATED (#1525)
--no-mariadb-socket is DEPRECATED; use --mariadb-user-host-login-scope='%' (wildcard) or --mariadb-user-host-login-scope=<myhostscope>, instead.
2024-12-07 17:29:14 +05:30
github-actions
e2ffe3b3fd chore: Update example.env 2024-12-07 08:28:00 +00:00
github-actions
c35d5e1d6c chore: Update example.env 2024-12-07 07:45:47 +00:00
mz-h
4745ea30cc Fix Connection Error (#1524) 2024-12-05 11:47:03 +05:30
dependabot[bot]
ce06dac357 chore(deps): bump docker/bake-action from 5.10.0 to 5.11.0 (#1523)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.10.0 to 5.11.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.10.0...v5.11.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-05 11:44:55 +05:30
github-actions
853ca71ac2 chore: Update example.env 2024-12-04 04:46:08 +00:00
dependabot[bot]
00411f17df chore(deps): bump pytest from 8.3.3 to 8.3.4 (#1522)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.3 to 8.3.4.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.3...8.3.4)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-04 10:07:33 +05:30
github-actions
4ade236eb0 chore: Update example.env 2024-11-27 16:11:05 +00:00
Sharon P Raju
17753dd8e0 Updated README.md (arm64 architecture) (#1520)
* Update README.md

Added documentation to run on arm64 architecture.

* fix: lint

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2024-11-27 14:01:18 +05:30
V3
99a3600d36 Changed pwd.yml (#1519)
* Update pwd.yml

changed some parameters, since syntax has changed:
- bench parameter for mariadb password is different
- mariadb parameter for password has changed

* fix: create site command in pwd.yml

* fix: create site command in pwd.yml

remove deprecated option and use new

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2024-11-26 16:07:20 +05:30
github-actions
657dfbb939 chore: Update example.env 2024-11-22 09:28:41 +00:00
github-actions
544892ff3e chore: Update example.env 2024-11-22 06:09:58 +00:00
github-actions
8ac8e75289 chore: Update example.env 2024-11-21 09:54:09 +00:00
github-actions
1997d0d4f1 chore: Update example.env 2024-11-20 08:46:46 +00:00
Revant Nandgaonkar
1c6f58c986 docs: fix broken link (#1516)
fixes #1510
2024-11-18 16:23:09 +05:30
rexeo-asia
324d9db461 Update docker-build-push.yml (#1512)
Fixes https://github.com/frappe/frappe_docker/issues/1511, add  docker/setup-qemu-action@v3 step
2024-11-15 16:54:53 +05:30
github-actions
a19e8b4aaa chore: Update example.env 2024-11-13 15:10:05 +00:00
Revant Nandgaonkar
6b50a57526 docs: fix logs command (#1509) 2024-11-12 14:39:09 +05:30
Revant Nandgaonkar
641550dce9 ci: push frappe or erpnext branch as tag (#1508)
* ci: push frappe or erpnext branch as tag

* ci: build arm64 images

* revert: build arm64 images
2024-11-11 11:52:27 +05:30
rexeo-asia
88ac02198a Update docker-build-push.yml to support arm64 (#1492) 2024-11-11 11:41:56 +05:30
github-actions
285abd0b07 chore: Update example.env 2024-11-08 09:21:06 +00:00
github-actions
0d35785d41 chore: Update example.env 2024-11-07 12:53:18 +00:00
Dr.Blank
faa2065026 docs: fix grammar in administrator password instructions (#1504)
Correct redundant wording and improve clarity in site creation documentation.
2024-11-07 09:10:13 +05:30
github-actions
41f67d9b6a chore: Update example.env 2024-11-06 05:31:07 +00:00
Revant Nandgaonkar
b24a4109c8 chore: fix pre-commit lint for md file (#1503) 2024-11-04 16:59:47 +05:30
Marc-Antoine Lalonde
5d0d14dde8 docs: clarify docker-compose and add steps to troubleshooting instructions (#1502)
Add steps to the database debugging guide to include more possibilities and fix mysql instructions.

Add explanation on the use of certain variables affected by network configuration.
2024-11-04 11:42:57 +05:30
github-actions
481fcc9410 chore: Update example.env 2024-10-30 10:01:36 +00:00
github-actions
560ad86b5b chore: Update example.env 2024-10-29 17:48:24 +00:00
github-actions
234c036dc5 chore: Update example.env 2024-10-29 15:58:08 +00:00
Revant Nandgaonkar
a919f44505 docs: quick build command (#1500)
* docs: quick build command

* chore: fix pre-commit lint for md file
2024-10-27 14:45:41 +05:30
Revant Nandgaonkar
3d6fb8c4b1 ci: push base and build images tags (#1499) 2024-10-25 15:54:37 +05:30
Revant Nandgaonkar
ebeac0ee43 ci: push base and build images (#1498) 2024-10-25 14:33:26 +05:30
Rakshit Menpara
44a357f758 fix: invalid nested interpolation (#1496)
Nested interpolation is not supported by docker (https://github.com/docker/cli/issues/4265). Changed the file so that it uses `CUSTOM_TAG` or `ERPNEXT_VERSION` if that's not available.
2024-10-25 14:08:37 +05:30
Revant Nandgaonkar
8ac69bb501 feat: allow layered custom image build (#1497)
speed up build time
pull builder image
pack built assets into base image
2024-10-25 14:08:24 +05:30
github-actions
fe880183f9 chore: Update example.env 2024-10-24 08:31:19 +00:00
github-actions
36704ece70 chore: Update example.env 2024-10-23 12:21:29 +00:00
github-actions[bot]
de28675f8f chore(deps): Update pre-commit hooks (#1495)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-10-23 17:11:50 +05:30
github-actions
f2924998e8 chore: Update example.env 2024-10-23 09:17:02 +00:00
github-actions
6bed906751 chore: Update example.env 2024-10-23 04:54:37 +00:00
github-actions
19b3012242 chore: Update example.env 2024-10-17 16:25:38 +00:00
github-actions
e7fff1db9a chore: Update example.env 2024-10-16 05:11:03 +00:00
Revant Nandgaonkar
727ce423ec chore: add link to FAQ in production container (#1493)
* chore: add link to FAQ in production container prompt

* chore: add message link to FAQ in production container

* docs: add link to FAQ in README
2024-10-15 11:38:00 +05:30
github-actions[bot]
f0796785d1 chore(deps): Update pre-commit hooks (#1490)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-10-15 10:37:16 +05:30
github-actions
17f8e49301 chore: Update example.env 2024-10-13 05:32:28 +00:00
github-actions[bot]
08e714e329 chore(deps): Update pre-commit hooks (#1488)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-10-10 07:10:17 +05:30
github-actions
ca573084d6 chore: Update example.env 2024-10-09 12:12:03 +00:00
Edward Almanzar
10c755fe0c Enhance Docs for Custom Apps: Base64 Decoding for Testing and Fix 'nginx-entrypoint.sh: No Such File' Issue on Windows only" (#1479)
* Decode the Base64-encoded Environment Variable

* add docs to fix nginx-entrypoint.sh: no such file on windows

* Revert "add docs to fix nginx-entrypoint.sh: no such file on windows"

This reverts commit 395d7cfa3f.

* add docs to fix nginx-entrypoint.sh: no such file on windows

* Fix files according to pre-commit hooks
2024-10-06 17:49:47 +05:30
Martin Heini
eb3ce8a146 increase mariadb health-check timeout (#1485) 2024-10-06 13:47:47 +05:30
github-actions[bot]
457f55e492 chore(deps): Update pre-commit hooks (#1486)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-10-06 13:20:18 +05:30
dependabot[bot]
6abc293ed9 chore(deps): bump docker/bake-action from 5.9.0 to 5.10.0 (#1480)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.9.0 to 5.10.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.9.0...v5.10.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-05 18:47:24 +05:30
github-actions
c5b6c7de6f chore: Update example.env 2024-10-04 03:13:06 +00:00
dependabot[bot]
41dd3fb110 chore(deps): bump docker/bake-action from 5.8.0 to 5.9.0 (#1478)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.8.0 to 5.9.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.8.0...v5.9.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 14:37:34 +05:30
dependabot[bot]
f4fd057d0f chore(deps): bump docker/bake-action from 5.7.0 to 5.8.0 (#1477)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.7.0...v5.8.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 06:49:58 +05:30
github-actions
111c8deb4a chore: Update example.env 2024-09-30 17:29:56 +00:00
github-actions
d062ef035b chore: Update example.env 2024-09-29 16:46:58 +00:00
github-actions
45259b4ebb chore: Update example.env 2024-09-27 18:40:16 +00:00
gp
5f815d88a9 Update Traefik container from deprecated v2.6 to v2.11 (#1475) 2024-09-26 12:50:18 +05:30
github-actions
dd18f558a4 chore: Update example.env 2024-09-25 04:47:36 +00:00
github-actions
083a62374e chore: Update example.env 2024-09-19 01:51:55 +00:00
github-actions
b16bad3975 chore: Update example.env 2024-09-18 07:41:09 +00:00
github-actions
509f88846f chore: Update example.env 2024-09-17 05:08:50 +00:00
dependabot[bot]
5ec965e71b chore(deps): bump pytest from 8.3.2 to 8.3.3 (#1466)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.2 to 8.3.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.2...8.3.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-15 03:10:02 +05:30
github-actions
893f0ebd1d chore: Update example.env 2024-09-12 06:19:49 +00:00
github-actions
fbb13c2b0a chore: Update example.env 2024-09-11 05:20:16 +00:00
github-actions
5064ece68c chore: Update example.env 2024-09-07 12:48:51 +00:00
github-actions
7fb2ff94a6 chore: Update example.env 2024-09-05 11:58:42 +00:00
dependabot[bot]
38a2ebf574 chore(deps): bump peter-evans/create-pull-request from 6 to 7 (#1461)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-05 09:51:39 +05:30
github-actions
8c34e94dbb chore: Update example.env 2024-09-04 15:08:07 +00:00
github-actions
7c4543d7ea chore: Update example.env 2024-08-23 00:46:19 +00:00
github-actions
b9ece35287 chore: Update example.env 2024-08-21 11:17:05 +00:00
github-actions
8a27a249c3 chore: Update example.env 2024-08-21 05:29:42 +00:00
Sagar
2deb97b7b5 Update example.env (#1445)
Added HTTP_PUBLISH_PORT variable for updating the published port. Default value will be 8080. if we want to update the port we can specify here.
2024-08-19 12:50:46 +05:30
dependabot[bot]
30cc91bfd4 chore(deps): bump docker/bake-action from 5.6.1 to 5.7.0 (#1457)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.6.1 to 5.7.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.6.1...v5.7.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-19 11:59:36 +05:30
github-actions
1bffb14853 chore: Update example.env 2024-08-16 11:18:14 +00:00
github-actions
9c9e1c4f1e chore: Update example.env 2024-08-16 06:27:25 +00:00
github-actions
a7dd0f9d08 chore: Update example.env 2024-08-14 08:09:40 +00:00
dependabot[bot]
79004d15bc chore(deps): bump docker/bake-action from 5.5.0 to 5.6.1 (#1453)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.5.0 to 5.6.1.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.5.0...v5.6.1)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 11:45:45 +05:30
github-actions[bot]
61ff94de86 chore(deps): Update pre-commit hooks (#1448)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-08-14 11:45:22 +05:30
dependabot[bot]
4f91e89503 chore(deps): bump pytest from 8.3.1 to 8.3.2 (#1447)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.1 to 8.3.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.1...8.3.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-14 11:44:48 +05:30
github-actions
624fc2ea83 chore: Update example.env 2024-08-08 07:22:51 +00:00
github-actions
b09fc2ee95 chore: Update example.env 2024-08-07 09:36:22 +00:00
github-actions
aeaaee09b6 chore: Update example.env 2024-08-03 04:07:19 +00:00
github-actions
6ae6591048 chore: Update example.env 2024-07-31 06:09:52 +00:00
github-actions
36e6650045 chore: Update example.env 2024-07-27 05:46:54 +00:00
github-actions
e70b9954c6 chore: Update example.env 2024-07-24 14:09:33 +00:00
github-actions
f46582fc46 chore: Update example.env 2024-07-24 07:35:38 +00:00
Sai Vineeth
c5b3f50b02 Updated example.env to include correct reference to doc (#1443) 2024-07-24 09:13:06 +05:30
dependabot[bot]
431d31df00 chore(deps): bump docker/bake-action from 5.4.0 to 5.5.0 (#1444)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.4.0...v5.5.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-24 04:53:39 +05:30
dependabot[bot]
3aa10ee435 chore(deps): bump pytest from 8.2.2 to 8.3.1 (#1442)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.2 to 8.3.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.2.2...8.3.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-24 04:53:23 +05:30
dependabot[bot]
c08851ecdc chore(deps): bump docker/bake-action from 5.3.0 to 5.4.0 (#1436)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.3.0 to 5.4.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.3.0...v5.4.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-22 13:46:16 +05:30
gp
9af0cfdf81 Fix: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (#1435) 2024-07-22 13:45:50 +05:30
github-actions
6ea76cd7a1 chore: Update example.env 2024-07-17 05:20:13 +00:00
github-actions
87782bbdf3 chore: Update example.env 2024-07-13 05:27:22 +00:00
github-actions
a9dbb0ef87 chore: Update example.env 2024-07-10 10:52:14 +00:00
github-actions
d91ea066fb chore: Update example.env 2024-07-05 02:55:39 +00:00
dependabot[bot]
0631489d25 chore(deps): bump docker/bake-action from 5.2.0 to 5.3.0 (#1427)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.2.0...v5.3.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-04 09:50:07 +05:30
gp
74b2bca9bf Fix: WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (#1426) 2024-07-04 02:49:10 +05:30
github-actions
83599aec23 chore: Update example.env 2024-07-03 15:04:42 +00:00
github-actions
22ca64c207 chore: Update example.env 2024-07-03 05:11:40 +00:00
vama
c1ee06b6ef Update README.md (#1423)
updated docker compose command
2024-06-30 04:12:24 +05:30
dependabot[bot]
484ff82e71 chore(deps): bump docker/bake-action from 5.1.0 to 5.2.0 (#1422)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-30 04:11:52 +05:30
github-actions
0e2d4eb50d chore: Update example.env 2024-06-29 16:27:27 +00:00
github-actions
6c7fe3de7f chore: Update example.env 2024-06-28 09:28:59 +00:00
Chev91
6c798cfb2b Update docker-compose.yml (#1415)
A challenge I encountered while setting up the Development instance. The command 'bench init --skip-redis-config-generation frappe-bench' kept generating errors, which I discovered were due to an architecture mismatch between Docker and macOS. By updating the platform to linux/amd64 in my code, I was able to resolve this issue.
2024-06-25 10:36:25 +05:30
dependabot[bot]
507bbe2274 chore(deps): bump docker/bake-action from 4.6.0 to 5.1.0 (#1420)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 4.6.0 to 5.1.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v4.6.0...v5.1.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 10:35:22 +05:30
github-actions
e1c924820f chore: Update example.env 2024-06-22 05:57:54 +00:00
github-actions
bec5cc97e1 chore: Update example.env 2024-06-19 06:34:37 +00:00
github-actions
a495cc8c0a chore: Update example.env 2024-06-12 12:03:06 +00:00
github-actions
d92503dec4 chore: Update example.env 2024-06-12 11:41:56 +00:00
github-actions
7fe7114ac8 chore: Update example.env 2024-06-11 13:23:14 +00:00
dependabot[bot]
ab3f6eab39 chore(deps): bump docker/bake-action from 4.5.0 to 4.6.0 (#1411)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-11 15:38:42 +05:30
github-actions
38a0b1fae2 chore: Update example.env 2024-06-11 09:59:42 +00:00
Himanshu Shivhare
10e28f4d9d hyperlink updated (#1407) 2024-06-10 12:22:49 +05:30
dependabot[bot]
f3890a8ddc chore(deps): bump pytest from 8.2.1 to 8.2.2 (#1406)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.1 to 8.2.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.2.1...8.2.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 12:22:17 +05:30
Chev91
281c072e77 fix: make docs more explicit for beginners (#1409) 2024-06-10 12:21:58 +05:30
github-actions
855c4f62cc chore: Update example.env 2024-06-10 05:04:01 +00:00
github-actions[bot]
63b3251312 chore(deps): Update pre-commit hooks (#1408)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-06-10 04:19:45 +05:30
Yeifer Alexander Muñoz Torres
fa543662ed #1402 Environment variables for custom image (#1403)
* chore: enhance compose.yaml with variables for customize

* chore: use default blank values for db and redis variables in compose.yaml

* chore: Use env var for HTTP(S) publish ports in overrides

* docs: explain use of environment variables for image customization

* chore: use ERPNEXT_VERSION as default

* docs: fixed spelling errors
2024-06-08 00:21:17 +05:30
github-actions
9da4d22dd7 chore: Update example.env 2024-06-06 12:29:57 +00:00
github-actions
943fe9605e chore: Update example.env 2024-06-05 01:26:41 +00:00
github-actions
408d853b20 chore: Update example.env 2024-05-30 14:06:07 +00:00
github-actions
ce16c6365c chore: Update example.env 2024-05-29 08:01:20 +00:00
Anthony
855ce6cb0b Update single-server-example.md (#1401)
Fix nonworking step - hashed password fails - per https://discuss.frappe.io/t/frappe-docker-unable-to-log-in-into-traefik/123077
2024-05-28 19:06:49 +05:30
github-actions[bot]
40c1f97823 chore(deps): Update pre-commit hooks (#1398)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-05-27 14:06:15 +05:30
github-actions
48d9e1a6ca chore: Update example.env 2024-05-22 08:55:20 +00:00
dependabot[bot]
0c41f01441 chore(deps): bump pytest from 8.2.0 to 8.2.1 (#1397)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.2.0 to 8.2.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.2.0...8.2.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 14:21:21 +05:30
github-actions
694f258b1f chore: Update example.env 2024-05-20 10:31:57 +00:00
github-actions
e2b3fa301e chore: Update example.env 2024-05-17 05:36:30 +00:00
github-actions
bef73253c7 chore: Update example.env 2024-05-15 13:35:41 +00:00
github-actions
5d950887fe chore: Update example.env 2024-05-15 05:21:04 +00:00
github-actions
9c3251a722 chore: Update example.env 2024-05-13 11:33:31 +00:00
github-actions
be41f8fe4f chore: Update example.env 2024-05-09 05:38:37 +00:00
Bowrna
8404d8946d Update development.md (#1392)
* Update development.md

The extension name is renamed

* Update development.md
2024-05-07 10:31:44 +05:30
github-actions
1544788406 chore: Update example.env 2024-05-06 08:50:11 +00:00
github-actions
13904d0a72 chore: Update example.env 2024-05-03 17:40:54 +00:00
github-actions
4be1624641 chore: Update example.env 2024-05-02 04:32:28 +00:00
Revant Nandgaonkar
0942b8873a fix: gitignore (#1391) 2024-05-01 12:25:49 +05:30
dependabot[bot]
6fd6c7f0ae chore(deps): bump docker/bake-action from 4.3.0 to 4.5.0 (#1390)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 4.3.0 to 4.5.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v4.3.0...v4.5.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-01 12:25:34 +05:30
dependabot[bot]
b7a652b9c6 chore(deps): bump pytest from 8.1.1 to 8.2.0 (#1389)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.1.1...8.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-01 12:25:05 +05:30
github-actions[bot]
c5404245b3 chore(deps): Update pre-commit hooks (#1384)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-05-01 12:24:38 +05:30
github-actions
1c78d3eb6a chore: Update example.env 2024-04-26 02:19:20 +00:00
Sudhegan Shyam
3b0ffc3bb9 add build library for arm64 binaries (#1379)
* add build library for arm64 binaries

* update git ignore

* move arm64 lib to base layer
2024-04-26 04:46:07 +05:30
github-actions[bot]
9e091abc8d chore(deps): Update pre-commit hooks (#1382)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-04-25 13:20:41 +05:30
github-actions
274ef8a975 chore: Update example.env 2024-04-25 03:47:23 +00:00
github-actions
c4fa0766d2 chore: Update example.env 2024-04-24 10:57:17 +00:00
github-actions
19f6fa52d4 chore: Update example.env 2024-04-19 08:48:43 +00:00
github-actions
9478eca866 chore: Update example.env 2024-04-17 09:34:14 +00:00
github-actions
9f04d4c0ba chore: Update example.env 2024-04-17 06:21:06 +00:00
github-actions[bot]
6af91304f1 chore(deps): Update pre-commit hooks (#1375)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-04-13 17:17:32 +05:30
github-actions
23c0c50993 chore: Update example.env 2024-04-13 10:37:29 +00:00
gp
3ec36e2e57 Improve custom apps documentation (#1374) 2024-04-13 07:54:32 +05:30
github-actions
1bc075401f chore: Update example.env 2024-04-12 10:10:30 +00:00
github-actions
e2a1b4fd0f chore: Update example.env 2024-04-11 13:32:35 +00:00
Richard Pablo
ade69369fb #1370 Adding platform parameter (#1371)
Adding the platform parameter to be able to run this compose in non amd64 platforms
2024-04-11 18:14:32 +05:30
github-actions
e94081df87 chore: Update example.env 2024-04-11 07:47:26 +00:00
github-actions[bot]
1479201fd4 chore(deps): Update pre-commit hooks (#1368)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-04-09 03:14:53 +05:30
github-actions
92f60cc16d chore: Update example.env 2024-04-07 10:49:06 +00:00
github-actions
901b9404b0 chore: Update example.env 2024-04-04 09:06:50 +00:00
github-actions
afd991bcba chore: Update example.env 2024-04-03 10:41:22 +00:00
github-actions
09c69baaec chore: Update example.env 2024-03-29 19:18:38 +00:00
github-actions
b48c1bcd1a chore: Update example.env 2024-03-29 05:50:30 +00:00
Arken June Malvecino
177f5ab96f Install Latest Version to Mac/Linux Doc Update (#1360)
* refactor: update from pwd.yml

* refactor: update erpnext image to v15
2024-03-29 10:25:34 +05:30
github-actions
b0373fd6a3 chore: Update example.env 2024-03-27 08:46:04 +00:00
github-actions
ff7e608d09 chore: Update example.env 2024-03-27 03:36:07 +00:00
github-actions[bot]
ef3e81253b chore(deps): Update pre-commit hooks (#1363)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-03-25 13:18:37 +05:30
github-actions
37c7625568 chore: Update example.env 2024-03-25 03:03:44 +00:00
Bernhard Sirlinger
6f33a8aeba feat: add defaultInterpreterPath as a vscode setting as a starting point according to docs (#1358)
See: https://github.com/microsoft/vscode-python/wiki/Setting-descriptions#pythondefaultinterpreterpath
2024-03-23 14:29:20 +05:30
github-actions
04092e153c chore: Update example.env 2024-03-22 10:39:23 +00:00
Dhafer Soudani
76a3d5df80 fix: add missing file package for bench restore (#1359)
Co-authored-by: dhafer <dhafer.souadni@ensi-uma.tn>
2024-03-22 11:27:00 +05:30
github-actions
530615fee3 chore: Update example.env 2024-03-21 17:39:04 +00:00
github-actions
a110ce9fb3 chore: Update example.env 2024-03-20 15:09:56 +00:00
github-actions
1015154385 chore: Update example.env 2024-03-20 05:32:07 +00:00
github-actions[bot]
feb1679099 chore(deps): Update pre-commit hooks (#1356)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-03-19 10:54:17 +05:30
github-actions[bot]
a7d3ec1816 chore(deps): Update pre-commit hooks (#1355)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-03-17 11:09:34 +05:30
dependabot[bot]
cf35c277ab chore(deps): bump docker/bake-action from 4.1.0 to 4.3.0 (#1354)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 4.1.0 to 4.3.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v4.1.0...v4.3.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-17 11:09:12 +05:30
dependabot[bot]
a8d7a70b26 chore(deps): bump pytest from 8.1.0 to 8.1.1 (#1350)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.1.0...8.1.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-17 11:08:57 +05:30
github-actions
f7c497e240 chore: Update example.env 2024-03-14 09:25:53 +00:00
github-actions
a33ec8460f chore: Update example.env 2024-03-13 04:37:40 +00:00
Revant Nandgaonkar
636c442fdb fix(dev): remove ssh from post start command (#1349)
no ssh service installed in frappe/bench:latest
for custom usage add to gitignored .devcontainer
2024-03-10 05:38:16 +05:30
github-actions
76976c30e1 chore: Update example.env 2024-03-07 09:33:50 +00:00
github-actions
82c65ec147 chore: Update example.env 2024-03-06 14:57:10 +00:00
github-actions
1eafdcdc85 chore: Update example.env 2024-03-06 03:40:05 +00:00
dependabot[bot]
997473863e chore(deps): bump pytest from 8.0.2 to 8.1.0 (#1347)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.2 to 8.1.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.0.2...8.1.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 14:11:59 +05:30
Malay Gondalia
ede911af0a Update custom-apps.md (#1344)
* Update custom-apps.md

made document clear to insert custom app to build and  resolved error -
"url": "https://user:password@git.example.com/project/repository.git",
to "url": "https://{{ PAT }}@git.example.com/project/repository.git",

* docs: remove comments from shell commands

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2024-02-29 20:59:32 +05:30
John Haugabook
955a3b0b65 fix: grammar and links (#1342)
Made grammar corrections, and added links to the prerequisite installations.
2024-02-29 17:46:18 +05:30
HENRY Florian
e582a2448d fix: add file cmd because restore bench need it since frappe commit: 50d21677b872ff89d2912c7b57467757a35f549a (#1343) 2024-02-29 17:45:56 +05:30
github-actions
33cbdb2693 chore: Update example.env 2024-02-28 05:22:17 +00:00
dependabot[bot]
ab0d6ad9e5 chore(deps): bump pytest from 8.0.1 to 8.0.2 (#1341)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.1 to 8.0.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.0.1...8.0.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 02:41:20 +05:30
github-actions
4c0aba6b0c chore: Update example.env 2024-02-26 07:42:07 +00:00
github-actions
3bc28d38b2 chore: Update example.env 2024-02-22 11:27:44 +00:00
github-actions
d028de4898 chore: Update example.env 2024-02-22 05:47:42 +00:00
github-actions
3360d23e55 chore: Update example.env 2024-02-21 05:38:43 +00:00
dependabot[bot]
2c317cb62d chore(deps): bump pytest from 8.0.0 to 8.0.1 (#1339)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.0.0...8.0.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-19 18:31:25 +05:30
github-actions[bot]
edb9948fc9 chore(deps): Update pre-commit hooks (#1338)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-02-19 18:31:06 +05:30
github-actions
f60dc88637 chore: Update example.env 2024-02-19 05:42:49 +00:00
github-actions
d027f04494 chore: Update example.env 2024-02-16 16:29:20 +00:00
github-actions
8961598d1e chore: Update example.env 2024-02-16 10:38:23 +00:00
Kevin Wakhisi Maraka
53c6a0e0c6 chore! 👽 Enhance dev container YAML (#1332)
* chore!i 👽 Enhance dev container YAML

Enhance dev container YAML to meet standards and integrate personal
GitHub environment token
Refactored the existing dev container YAML configuration to adhere to
best practices and coding standards. This includes optimizing container
setup and dependencies for smoother development workflows. Additionally,
integrated a personal GitHub environment token for secure authentication
and access to GitHub resources within the container environment. This
improvement enhances both security and usability, streamlining the
development process.

* chore 💄 Fixed earlier commit

Earlier commit fixed using pre-commit
2024-02-16 12:23:01 +05:30
github-actions[bot]
7fee2dc8f3 chore(deps): Update pre-commit hooks (#1334)
Co-authored-by: vrslev <75225148+vrslev@users.noreply.github.com>
2024-02-15 10:50:49 +05:30
github-actions
ff532e14d2 chore: Update example.env 2024-02-14 12:21:56 +00:00
github-actions
52a79ad820 chore: Update example.env 2024-02-11 12:28:54 +00:00
github-actions
298b1bb7c9 chore: Update example.env 2024-02-07 14:31:51 +00:00
github-actions
2446713aea chore: Update example.env 2024-02-07 06:16:38 +00:00
github-actions
68f638ea5d chore: Update example.env 2024-02-06 18:53:17 +00:00
github-actions
6f9ecc221f chore: Update example.env 2024-02-02 15:33:00 +00:00
dependabot[bot]
ca6094dc79 chore(deps): bump peter-evans/create-pull-request from 5 to 6 (#1326)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 17:36:48 +05:30
github-actions
8c3be45763 chore: Update example.env 2024-01-30 14:22:48 +00:00
dependabot[bot]
100ab30aef chore(deps): bump pytest from 7.4.4 to 8.0.0 (#1323)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.4 to 8.0.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.4...8.0.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 17:07:03 +05:30
github-actions
ef7a2dd310 chore: Update example.env 2024-01-29 04:48:36 +00:00
github-actions[bot]
479faf78d2 chore(deps): Update pre-commit hooks (#1322)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2024-01-29 03:03:54 +05:30
0xD0M1M0
961453812c fix: Fix gpg and less (#1321)
* fix: Add gpg and less

Add gpg so backup "bench --site yoursite.com backup --with-files --compress" does not fail if encryption is enabled

Add "less": fixes #1301

* fix: Add gpg and less

Add gpg so backup "bench --site yoursite.com backup --with-files --compress" does not fail if encryption is enabled

Add "less": fixes frappe#1301

* fix: Update documentation

update documentation to resemble current status

* fix: trailing whitespace

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2024-01-28 11:53:14 +05:30
Revant Nandgaonkar
220db20347 fix: typo in compose.yaml (#1320)
typo in PROXY_READ_TIMEOUT

fixes https://github.com/frappe/frappe_docker/issues/1315
2024-01-27 10:41:24 +05:30
github-actions[bot]
c10d2e8799 chore(deps): Update pre-commit hooks (#1318)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2024-01-27 10:23:30 +05:30
github-actions
f70b05e374 chore: Update example.env 2024-01-27 04:52:46 +00:00
Tengku Izdihar
337a024a21 frontend depends_on websocket to avoid error on startup (#1313)
* frontend depends_on websocket to avoid error on startup

* ci: fix lint

---------

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2024-01-26 11:18:26 +05:30
github-actions
c8c6f82645 chore: Update example.env 2024-01-25 06:57:41 +00:00
github-actions
ed5b6f485a chore: Update example.env 2024-01-24 08:08:56 +00:00
github-actions
8b6a61c366 chore: Update example.env 2024-01-23 12:03:30 +00:00
github-actions
9a54fb709d chore: Update example.env 2024-01-19 00:53:52 +00:00
github-actions
43a156ef6c chore: Update example.env 2024-01-17 17:14:42 +00:00
github-actions
88dfbe4ce3 chore: Update example.env 2024-01-15 06:57:02 +00:00
github-actions
f06e792bef chore: Update example.env 2024-01-10 10:48:51 +00:00
github-actions
4dc375d8b2 chore: Update example.env 2024-01-03 15:46:36 +00:00
github-actions
a582a57125 chore: Update example.env 2024-01-03 06:10:05 +00:00
dependabot[bot]
8584e3be64 chore(deps): bump pytest from 7.4.3 to 7.4.4 (#1302)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.3 to 7.4.4.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.3...7.4.4)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 10:42:28 +05:30
github-actions
87775c009d chore: Update example.env 2023-12-28 13:39:53 +00:00
github-actions
0ec913bbc7 chore: Update example.env 2023-12-28 12:25:36 +00:00
github-actions
95e263d012 chore: Update example.env 2023-12-28 06:04:23 +00:00
github-actions
bc23a404e3 chore: Update example.env 2023-12-27 08:49:28 +00:00
github-actions[bot]
dc04cd26ec chore(deps): Update pre-commit hooks (#1299)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-12-24 21:38:27 +05:30
github-actions
28297541bf chore: Update example.env 2023-12-20 04:54:23 +00:00
Revant Nandgaonkar
680c275ef5 revert: pre-commit prettier to 3.1.0 (#1295) 2023-12-18 12:30:12 +05:30
github-actions[bot]
87cdca377f chore(deps): Update pre-commit hooks (#1293)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-12-18 12:00:37 +05:30
github-actions[bot]
4ee6e61ae1 chore(deps): Update pre-commit hooks (#1281)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-12-16 09:20:34 +05:30
Trusted Computer
b2e71bb12d Update custom-apps.md for version-15 (#1291)
Updating documentation examples to version-15
2023-12-16 09:19:26 +05:30
dependabot[bot]
01f92e63f1 chore(deps): bump actions/stale from 8 to 9 (#1290)
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-16 09:14:48 +05:30
github-actions
dba13b4fda chore: Update example.env 2023-12-13 18:58:25 +00:00
github-actions
e70572e77a chore: Update example.env 2023-12-12 16:20:41 +00:00
MohsinAli
89860467d4 fix: space (#1285) 2023-12-07 14:19:32 +05:30
dependabot[bot]
4717c3ee73 chore(deps): bump actions/setup-python from 4 to 5 (#1287)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 14:15:08 +05:30
dependabot[bot]
04128c60eb chore(deps): bump actions/setup-go from 4 to 5 (#1286)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-07 14:14:43 +05:30
Piyush
4aa07b3672 Update troubleshoot.md (#1283)
Added instructions for removal if want to start afresh
2023-12-07 10:20:39 +05:30
github-actions
2aa5b30969 chore: Update example.env 2023-12-05 14:00:19 +00:00
github-actions
6ccb110203 chore: Update example.env 2023-11-28 16:33:29 +00:00
Bhavansathru
64cd39265b Update development.md (#1274) 2023-11-23 14:14:04 +05:30
github-actions
22a4787dbc chore: Update example.env 2023-11-21 19:05:58 +00:00
dependabot[bot]
947fbae8bb chore(deps): bump docker/bake-action from 4.0.0 to 4.1.0 (#1272)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-20 14:16:04 +05:30
github-actions
28113baebf chore: Update example.env 2023-11-17 07:52:22 +00:00
github-actions
d92ba9f441 chore: Update example.env 2023-11-16 06:59:51 +00:00
github-actions[bot]
9da52f5009 chore(deps): Update pre-commit hooks (#1270)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-11-14 12:50:08 +05:30
Bernhard Sirlinger
45200bd57f feat: add optional mailpit configuration (#1269) 2023-11-14 03:10:15 +05:30
github-actions[bot]
9321153b79 chore(deps): Update pre-commit hooks (#1268)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-11-08 17:04:00 +05:30
vama
aaae152392 Updated grammer in single-server-example.md (#1265) 2023-11-02 04:25:08 +05:30
keerthana
f2dc0e8f6a PYENV_VERSION=3.10.12 Deprecated (#1262)
The PYENV_VERSION 3.10.12 is deprecated the new version 3.10.13 was launched. here the reference link

https://hub.docker.com/_/python
2023-10-30 20:27:31 +05:30
Revant Nandgaonkar
27361b7500 docs: set-config for redis_socketio during development (#1261) 2023-10-30 11:56:22 +05:30
Revant Nandgaonkar
2e99af1a3f fix: new-site command (#1260)
fix command usage and docs

fixes issue#1256
2023-10-30 11:45:55 +05:30
varun-krishnamurthy
ead5438ebb Cypress UI Test service and updates to installer.py (#1250)
* #1247 #1248 Feat: Cypress UI testing + Postgres Arg for installer

* #1247 #1248 Feat: Cypress UI testing + Postgres Arg for installer

* #1247 #1248 Feat: Cypress UI testing + Postgres Arg for installer

* #1247 #1248 Feat: Cypress UI testing + Postgres Arg for installer

* #1247 #1248 Feat: Cypress UI testing + Postgres Arg for installer

* #1247 #1248 Feat: Cypress UI testing + Postgres Arg for installer

* #1247 #1248 Feat: Cypress UI testing + Postgres Arg for installer
2023-10-26 08:35:31 +05:30
dependabot[bot]
122927662c chore(deps): bump pytest from 7.4.2 to 7.4.3 (#1251)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.2 to 7.4.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.2...7.4.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-25 15:26:01 +05:30
Revant Nandgaonkar
839d44d167 fix: consume default queue (#1249) 2023-10-25 10:51:30 +05:30
github-actions[bot]
ebf3df296f chore(deps): Update pre-commit hooks (#1246)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-10-25 01:42:43 +05:30
Revant Nandgaonkar
cc326b625a fix: installer.py compatible with v14 (#1244) 2023-10-22 14:24:52 +05:30
github-actions
1d17e8f752 chore: Update example.env 2023-10-20 13:47:22 +00:00
Revant Nandgaonkar
f605addb71 refactor: prepare for v15 (#1243)
* chore: resolve merge conflict

* ci: changes for version 15

* chore: upgrade python and nodejs

* ci: fix v15 build

* fix: add redis_socketio for backward compatibility

* ci: fix v15 build

* ci: fix test endpoint

changed to erpnext.templates.pages.search_help.get_help_results_sections
2023-10-20 18:40:10 +05:30
github-actions[bot]
ab5f985536 chore(deps): Update pre-commit hooks (#1240)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-10-20 17:33:14 +05:30
Revant Nandgaonkar
dddb791c81 fix: sync nginx template from bench changes (#1242) 2023-10-20 16:30:55 +05:30
Revant Nandgaonkar
7f8d794835 fix: sync nginx template from bench changes (#1241) 2023-10-20 15:52:14 +05:30
github-actions
be174a164a chore: Update example.env 2023-10-19 11:58:37 +00:00
github-actions
0333e62884 chore: Update example.env 2023-10-12 02:27:59 +00:00
github-actions
4c9b779fac chore: Update example.env 2023-10-11 11:27:55 +00:00
github-actions[bot]
26f921d7dc chore(deps): Update pre-commit hooks (#1238)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-10-10 04:02:09 +05:30
github-actions
d03ada5091 chore: Update example.env 2023-10-04 14:49:43 +00:00
github-actions[bot]
dffe7486ed chore(deps): Update pre-commit hooks (#1236)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-10-04 11:06:51 +05:30
github-actions
edb37d1686 chore: Update example.env 2023-10-04 02:30:39 +00:00
github-actions[bot]
040ceea2a1 chore(deps): Update pre-commit hooks (#1235)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-09-30 12:31:08 +05:30
github-actions
f8e1a25fe0 chore: Update example.env 2023-09-29 07:02:26 +00:00
github-actions
8b6392d655 chore: Update example.env 2023-09-27 07:54:13 +00:00
github-actions
aa1fc53b40 chore: Update example.env 2023-09-27 05:51:54 +00:00
github-actions[bot]
051b959526 chore(deps): Update pre-commit hooks (#1234)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-09-24 22:29:53 +05:30
github-actions[bot]
bfdb0497fe chore(deps): Update pre-commit hooks (#1233)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-09-22 17:43:33 +05:30
github-actions[bot]
afcc9f1aeb chore(deps): Update pre-commit hooks (#1231)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-09-22 03:10:35 +05:30
github-actions
b4d8209c90 chore: Update example.env 2023-09-20 06:37:00 +00:00
github-actions[bot]
fb2fc88cb9 chore(deps): Update pre-commit hooks (#1228)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-09-17 18:06:11 +05:30
dependabot[bot]
1aadcf9676 chore(deps): bump docker/setup-qemu-action from 2 to 3 (#1227)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 08:59:31 +05:30
dependabot[bot]
5a963bd59b chore(deps): bump docker/bake-action from 3.1.0 to 4.0.0 (#1226)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v3.1.0...v4.0.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 22:10:39 +05:30
dependabot[bot]
413cea31aa chore(deps): bump docker/setup-buildx-action from 2 to 3 (#1225)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 22:10:06 +05:30
dependabot[bot]
1da736b4b6 chore(deps): bump docker/login-action from 2 to 3 (#1224)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 22:09:27 +05:30
github-actions
df19210889 chore: Update example.env 2023-09-12 12:33:05 +00:00
github-actions[bot]
9e17b0ed97 chore(deps): Update pre-commit hooks (#1223)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-09-11 21:37:33 +05:30
github-actions[bot]
405628835f chore(deps): Update pre-commit hooks (#1222)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-09-09 15:24:06 +05:30
dependabot[bot]
262e57237b chore(deps): bump pytest from 7.4.1 to 7.4.2 (#1221)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.1 to 7.4.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.1...7.4.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-09 15:23:12 +05:30
github-actions
252b2e12d3 chore: Update example.env 2023-09-06 06:12:26 +00:00
dependabot[bot]
7c6f953bd7 chore(deps): bump actions/checkout from 3 to 4 (#1220)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 03:24:07 +05:30
dependabot[bot]
16a93c94a0 chore(deps): bump pytest from 7.4.0 to 7.4.1 (#1219)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.0 to 7.4.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.4.0...7.4.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 03:22:54 +05:30
github-actions
514f535955 chore: Update example.env 2023-08-31 14:23:18 +00:00
github-actions[bot]
d29f68ff73 chore(deps): Update pre-commit hooks (#1218)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-08-31 19:03:23 +05:30
github-actions
43ea0d5f13 chore: Update example.env 2023-08-30 14:08:10 +00:00
Antony-M1
258fec25d2 3.9.9 deprecated (#1216)
* Update development.md

* 3.9.9 deprecated
2023-08-25 21:32:37 +05:30
Mahmoud (Moudy) Taleb
8fa392ffff Add cd command for clarity (#1214) 2023-08-24 14:06:05 +05:30
github-actions
05a383fd3a chore: Update example.env 2023-08-23 03:11:18 +00:00
github-actions
aaa64a2149 chore: Update example.env 2023-08-18 15:42:31 +00:00
github-actions[bot]
efeeb03fc6 chore(deps): Update pre-commit hooks (#1210)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-08-17 18:54:13 +05:30
github-actions
e56d3b7c22 chore: Update example.env 2023-08-17 12:45:59 +00:00
github-actions
2e28bce3b2 chore: Update example.env 2023-08-16 06:53:38 +00:00
github-actions
b3d807fc54 chore: Update example.env 2023-08-11 13:41:51 +00:00
github-actions
5f045098fe chore: Update example.env 2023-08-10 12:40:38 +00:00
github-actions
84c524e405 chore: Update example.env 2023-08-10 08:17:46 +00:00
github-actions
b2b15e9d56 chore: Update example.env 2023-08-09 03:18:04 +00:00
Chris Darby
cf499acc36 Broken link to environment variables definition fixed (#1205) 2023-08-08 09:38:36 +05:30
github-actions[bot]
eb88625f93 chore(deps): Update pre-commit hooks (#1203)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-08-04 12:45:00 +05:30
github-actions
1db2bc6b6d chore: Update example.env 2023-08-03 08:02:43 +00:00
github-actions
8757ad9755 chore: Update example.env 2023-08-02 07:44:54 +00:00
github-actions
4207982e65 chore: Update example.env 2023-08-01 18:18:32 +00:00
Rishab Manocha
29e9ccf20a Fixed the instructions to refer to the correct filename (#1197) 2023-07-31 20:02:24 +05:30
github-actions[bot]
480c642325 chore(deps): Update pre-commit hooks (#1198)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-07-31 20:00:16 +05:30
Revant Nandgaonkar
8c670e6db7 docs: change sitename as per installer.py (#1196) 2023-07-31 05:10:23 +05:30
github-actions
13c0183a79 chore: Update example.env 2023-07-26 06:39:40 +00:00
github-actions
55938bd5fc chore: Update example.env 2023-07-26 04:21:53 +00:00
Revant Nandgaonkar
cf6bb37648 ci: tag frappe/bench:latest (#1191) 2023-07-24 16:57:39 +05:30
Revant Nandgaonkar
7d1d9b17fd fix: use ping api instead of version api (#1190) 2023-07-24 12:49:49 +05:30
github-actions
17385266ee chore: Update example.env 2023-07-20 14:54:07 +00:00
Revant Nandgaonkar
9429501407 docs: remove obsolete docs (#1186) 2023-07-20 13:03:03 +05:30
github-actions
70c40e2be0 chore: Update example.env 2023-07-19 08:21:45 +00:00
github-actions
0936a1a9e3 chore: Update example.env 2023-07-19 05:54:00 +00:00
github-actions
a5ab1d3717 chore: Update example.env 2023-07-18 14:10:58 +00:00
github-actions
96fc3ff31c chore: Update example.env 2023-07-18 09:58:44 +00:00
Amal Paul
c3df323a9f Tag bench images with the latest bench release version (#1183)
Remove latest tag and make it default
2023-07-18 09:32:27 +05:30
github-actions
f485a13a25 chore: Update example.env 2023-07-14 14:48:14 +00:00
github-actions
7abbd83587 chore: Update example.env 2023-07-14 13:04:30 +00:00
github-actions
e7c2c386b7 chore: Update example.env 2023-07-14 11:11:47 +00:00
github-actions
0b3f245079 chore: Update example.env 2023-07-14 06:08:22 +00:00
github-actions
df3daac8ad chore: Update example.env 2023-07-13 11:14:57 +00:00
github-actions
011365c89b chore: Update example.env 2023-07-11 14:24:04 +00:00
github-actions
4a7ebf48c4 chore: Update example.env 2023-07-11 13:16:03 +00:00
Revant Nandgaonkar
d5aae2097d fix: use python for installer script (#1178) 2023-07-11 17:18:11 +05:30
github-actions[bot]
d60e32bce7 chore(deps): Update pre-commit hooks (#1177)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-07-11 12:34:28 +05:30
github-actions
52296380f1 chore: Update example.env 2023-07-10 14:22:25 +00:00
github-actions[bot]
a90d435e61 chore(deps): Update pre-commit hooks (#1173)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-07-09 14:56:46 +05:30
Antony-M1
69fbc2ed91 Update development.md (#1168) 2023-07-06 05:30:14 +05:30
github-actions
34b1188175 chore: Update example.env 2023-07-05 16:35:32 +00:00
github-actions
c90913d563 chore: Update example.env 2023-07-05 10:01:45 +00:00
Faris Ansari
2b4b39a65b fix: set node version to 18 for frappe develop (#1166) 2023-07-02 17:20:33 +05:30
github-actions[bot]
605eb99853 chore(deps): Update pre-commit hooks (#1165)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-07-02 13:25:36 +05:30
github-actions
012d2d3d6d chore: Update example.env 2023-07-02 06:00:57 +00:00
github-actions
ce272a9290 chore: Update example.env 2023-06-28 16:16:24 +00:00
github-actions
0279f8fae2 chore: Update example.env 2023-06-28 15:38:22 +00:00
Revant Nandgaonkar
779f8be4fe fix: add python 3.11 and nodejs 18 (#1163)
used for frappe develop branch
2023-06-28 15:53:35 +05:30
github-actions
445bc3402e chore: Update example.env 2023-06-28 05:09:48 +00:00
Revant Nandgaonkar
ed6301c48f ci: fix develop build (#1161) 2023-06-27 11:42:27 +05:30
dependabot[bot]
412230c63a chore(deps): bump pytest from 7.3.2 to 7.4.0 (#1160)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.2 to 7.4.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.3.2...7.4.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 16:22:02 +05:30
Revant Nandgaonkar
e401be4cb0 docs: update python and nodejs version (#1159)
python image 3.10.12 onwards gets built on bookworm
2023-06-26 14:05:25 +05:30
Revant Nandgaonkar
e6c0e7263b ci: refactor (#1158)
* ci: refactor

use debian bookworm
use updated wkhtmltopdf
override python and nodejs versions

* ci: fix bench and test

* ci: remove comments from example.env

* docs: add maintenance section
2023-06-26 11:54:37 +05:30
github-actions
2c3a57ae90 chore: Update example.env 2023-06-23 03:10:17 +00:00
github-actions
32b5140c75 chore: Update example.env 2023-06-22 09:46:34 +00:00
github-actions
a2cfbf988f chore: Update example.env 2023-06-22 06:38:16 +00:00
github-actions
5145e4fff5 chore: Update example.env 2023-06-20 16:17:32 +00:00
github-actions[bot]
59b3f3b180 chore(deps): Update pre-commit hooks (#1156)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-06-20 09:31:59 +05:30
github-actions
82dbfd9c0b chore: Update example.env 2023-06-19 11:51:42 +00:00
github-actions
a27f751472 chore: Update example.env 2023-06-17 08:46:06 +00:00
github-actions
a14bdf3784 chore: Update example.env 2023-06-17 07:18:47 +00:00
dependabot[bot]
90edb8492e chore(deps): bump docker/bake-action from 3.0.1 to 3.1.0 (#1151)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 3.0.1 to 3.1.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v3.0.1...v3.1.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-16 08:41:48 +05:30
github-actions[bot]
335cbe4777 chore(deps): Update pre-commit hooks (#1153)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-06-16 08:41:26 +05:30
github-actions
4a6c7956e4 chore: Update example.env 2023-06-15 08:21:31 +00:00
github-actions
507eeb334a chore: Update example.env 2023-06-15 06:52:30 +00:00
github-actions
f75623f372 chore: Update example.env 2023-06-14 15:32:30 +00:00
github-actions
ebed6f8f67 chore: Update example.env 2023-06-14 05:19:32 +00:00
dependabot[bot]
6ecc6202bc chore(deps): bump pytest from 7.3.1 to 7.3.2 (#1150)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.1 to 7.3.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.3.1...7.3.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 04:06:34 +05:30
Karan Janthe
a6e1baa9b7 added guide for linux/mac to setup frappe docker (#1149)
* added guide for linux/mac to setup frappe docker

* guide added in readme

* linting done according to guidelines
2023-06-13 04:06:15 +05:30
github-actions[bot]
3ee6acab4f chore(deps): Update pre-commit hooks (#1147)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-06-12 11:51:50 +05:30
github-actions
0adebb1e23 chore: Update example.env 2023-06-09 17:09:09 +00:00
github-actions
4a87ecdf9e chore: Update example.env 2023-06-07 06:28:56 +00:00
Hardik Zinzuvadiya
84569ea158 Fix typo in PROXY_READ_TIMEOUT in .env and pwd.yaml (#1146)
* Fix typo in PROXY_READ_TIMEOUT in pwd.yaml

* Fix typo in PROXY_READ_TIMEOUT in example.env
2023-06-03 10:44:33 +05:30
github-actions[bot]
ea48cf5300 chore(deps): Update pre-commit hooks (#1145)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-06-03 10:09:27 +05:30
github-actions
191fb66a0d chore: Update example.env 2023-05-31 06:29:50 +00:00
github-actions
ebe09e4e60 chore: Update example.env 2023-05-25 07:08:22 +00:00
github-actions
68514dd80e chore: Update example.env 2023-05-24 03:14:45 +00:00
github-actions
a8ee005622 chore: Update example.env 2023-05-18 09:45:16 +00:00
github-actions
5e93b3cdcd chore: Update example.env 2023-05-16 17:13:07 +00:00
github-actions
7abad8876e chore: Update example.env 2023-05-12 10:17:31 +00:00
akash-m-envsage
01a96f2c8d fix(data persistency): docker volume persistency issue (#1139)
because of the missing /data path, there was an issue wherein the data
would be lost after docker compose down
2023-05-12 08:43:12 +05:30
Revant Nandgaonkar
e9fa75d144 fix: use stable bench branch (#1138)
#1137
2023-05-10 15:47:37 +05:30
github-actions
e129437c2b chore: Update example.env 2023-05-10 05:52:21 +00:00
github-actions[bot]
e3e97dc47d chore(deps): Update pre-commit hooks (#1134)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-05-07 17:45:24 +05:30
github-actions
3ff0528865 chore: Update example.env 2023-05-06 11:26:37 +00:00
github-actions
5d3b01f9ce chore: Update example.env 2023-05-04 18:14:29 +00:00
github-actions
2e67ef231a chore: Update example.env 2023-05-04 05:06:09 +00:00
github-actions
25a7633e0c chore: Update example.env 2023-05-03 04:34:42 +00:00
github-actions[bot]
03d1d95b6a chore(deps): Update pre-commit hooks (#1128)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-04-26 04:51:05 +05:30
github-actions
1bfb5dbf2c chore: Update example.env 2023-04-25 17:08:59 +00:00
github-actions
1b05e5f43e chore: Update example.env 2023-04-24 12:53:29 +00:00
dependabot[bot]
266ae176b5 chore(deps): bump docker/bake-action from 3.0.0 to 3.0.1 (#1123)
* chore(deps): bump docker/bake-action from 3.0.0 to 3.0.1

Bumps [docker/bake-action](https://github.com/docker/bake-action) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* ci: upgrade pip for pre-commit lint

* ci: use python from ubuntu repos

* ci: install build essential

* ci: remove cache action

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2023-04-21 11:42:25 +05:30
github-actions
0b10891002 chore: Update example.env 2023-04-20 07:46:10 +00:00
github-actions
37ae8018e7 chore: Update example.env 2023-04-20 05:24:54 +00:00
dependabot[bot]
e56454a147 chore(deps): bump docker/bake-action from 2.3.0 to 3.0.0 (#1120)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 2.3.0 to 3.0.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v2.3.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 09:01:03 +05:30
github-actions
65fc0ab67a chore: Update example.env 2023-04-19 01:48:10 +00:00
dependabot[bot]
572b6483d4 chore(deps): bump pytest from 7.3.0 to 7.3.1 (#1118)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.0 to 7.3.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.3.0...7.3.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 19:04:21 +05:30
github-actions
2bd0b12d51 chore: Update example.env 2023-04-11 11:52:46 +00:00
dependabot[bot]
1183250a30 chore(deps): bump pytest from 7.2.2 to 7.3.0 (#1115)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.2 to 7.3.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.2...7.3.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 02:54:24 +05:30
github-actions
6d4185e318 chore: Update example.env 2023-04-06 08:05:59 +00:00
github-actions
130e6a7ff2 chore: Update example.env 2023-04-05 19:10:21 +00:00
dependabot[bot]
d851972b36 chore(deps): bump peter-evans/create-pull-request from 4 to 5 (#1114)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-05 17:16:54 +05:30
github-actions
f7768a4abc chore: Update example.env 2023-04-03 18:02:27 +00:00
github-actions[bot]
aee530e3e7 chore(deps): Update pre-commit hooks (#1111)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-03-29 21:42:52 +05:30
Bernhard Sirlinger
549423422a fix: yaml import formatting in compose file (#1112) 2023-03-29 21:42:28 +05:30
github-actions
e9f7c5f48a chore: Update example.env 2023-03-28 18:30:01 +00:00
dependabot[bot]
f8e5990992 chore(deps): bump webfactory/ssh-agent from 0.7.0 to 0.8.0 (#1110)
Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/webfactory/ssh-agent/releases)
- [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webfactory/ssh-agent/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: webfactory/ssh-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-27 18:55:50 +05:30
dependabot[bot]
807af25e6b chore(deps): bump actions/stale from 7 to 8 (#1108)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-23 16:29:23 +05:30
Azwal Zaman Mohammed
8b38448d8a docs: change command for updating sites in single server example (#1107)
The previous command added an extra variable to the env file while keeping the default so I changed the command to update it with sed instead
2023-03-23 10:46:34 +05:30
github-actions
786c5d19d2 chore: Update example.env 2023-03-21 13:04:05 +00:00
dependabot[bot]
3c204b14dd chore(deps): bump actions/setup-go from 3 to 4 (#1102)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 17:18:03 +05:30
github-actions
e2bfa36acd chore: Update example.env 2023-03-14 17:50:57 +00:00
Revant Nandgaonkar
fb05f01fd4 Revert "Build arm64 images in addition to amd64 images (#1098)" (#1099)
This reverts commit 84fcbd9bf6.
2023-03-13 11:03:01 +05:30
Chillar Anand
84fcbd9bf6 Build arm64 images in addition to amd64 images (#1098) 2023-03-13 10:02:50 +05:30
github-actions
f959d8a91c chore: Update example.env 2023-03-09 10:39:49 +00:00
github-actions[bot]
de204db676 chore(deps): Update pre-commit hooks (#1095)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-03-09 14:51:57 +05:30
github-actions
26d7f37f23 chore: Update example.env 2023-03-07 17:35:06 +00:00
github-actions
3d338748b3 chore: Update example.env 2023-03-07 14:37:54 +00:00
dependabot[bot]
b0571c51f5 chore(deps): bump pytest from 7.2.1 to 7.2.2 (#1089)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.1 to 7.2.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.1...7.2.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 17:01:42 +05:30
Revant Nandgaonkar
98ea4212a4 fix: default config for production (#1088)
reported here https://discuss.frappe.io/t/frappe-docker-2023-production-setup-password-reset-email-link-added-with-port-8000/101844
2023-03-05 18:48:37 +05:30
github-actions[bot]
984daf2c5e chore(deps): Update pre-commit hooks (#1086)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-03-04 19:35:41 +05:30
github-actions[bot]
cba5b9a1dc chore(deps): Update pre-commit hooks (#1085)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-03-03 13:56:49 +05:30
github-actions
28b18defa4 chore: Update example.env 2023-03-02 08:20:26 +00:00
github-actions
5a4a19c7a6 chore: Update example.env 2023-03-01 10:37:15 +00:00
github-actions
c34156b60b chore: Update example.env 2023-02-28 13:43:25 +00:00
github-actions
58397f74cb chore: Update example.env 2023-02-24 10:24:25 +00:00
github-actions
06adf10e16 chore: Update example.env 2023-02-21 17:29:36 +00:00
Revant Nandgaonkar
bcf41ff9f1 docs: update backup docs (#1082) 2023-02-17 13:15:49 +05:30
Revant Nandgaonkar
0228f06e81 fix: create apps.txt during configuration (#1081) 2023-02-15 17:16:11 +05:30
github-actions
be66a1f468 chore: Update example.env 2023-02-15 10:47:13 +00:00
github-actions
5bc1fefa0b chore: Update example.env 2023-02-14 10:50:53 +00:00
Leonard Goertz
4a18d57e8d fix typo frape -> frappe (#1073) 2023-02-02 17:29:35 +05:30
Alfredo Altamirano
0d37d6505f feat: add traefik restart policy (#1071)
Co-authored-by: Alfredo Altamirano <Ahuahuachi@users.noreply.github.com>
2023-02-02 14:52:42 +05:30
Revant Nandgaonkar
a580385295 fix: traefik router for acme certs (#1068)
* fix: traefik router for acme certs

* fix: set default for sites

* test: use .localhost site names
2023-02-02 13:45:06 +05:30
github-actions
8f843c1522 chore: Update example.env 2023-02-01 17:58:30 +00:00
Mauricio Vidal
87870be936 Clarification on how to use custom image (#1062)
* Clarification on how to use custom image

* chore: fix lint

* refactor: websocket uses also customizable_image

---------

Co-authored-by: Mauricio Vidal <maovidal@users.noreply.github.com>
2023-02-01 22:12:08 +05:30
github-actions[bot]
31aed68670 chore(deps): Update pre-commit hooks (#1070)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-02-01 13:32:13 +05:30
github-actions
dd82961e4c chore: Update example.env 2023-01-31 06:31:42 +00:00
Revant Nandgaonkar
c013942d1f fix: use docker volumes (#1067)
* fix: use docker volumes

remove bind mount
use docker volumes

* ci: remove payments app from tests
2023-01-31 09:48:52 +05:30
github-actions[bot]
8342bd93c8 chore(deps): Update pre-commit hooks (#1066)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2023-01-29 22:43:17 +05:30
Revant Nandgaonkar
8dce4e5f2c docs: fix migration steps (#1065) 2023-01-28 12:40:46 +05:30
Revant Nandgaonkar
499c1fbed4 fix: remove payments (#1063)
payments is optional dep for erpnext
2023-01-28 12:20:45 +05:30
Revant Nandgaonkar
6a3b97302c docs: fix kaniko build-arg (#1058) 2023-01-25 17:27:43 +05:30
Salah Aldin Fateh
1962ac2eec Remove unnecessary WORKDIR (#1057) 2023-01-25 17:27:30 +05:30
github-actions
ccb3117a38 chore: Update example.env 2023-01-25 04:11:59 +00:00
Salah Aldin Fateh
f0d94819a3 add read perms to nginx-entrypoint (#1053)
* add read perms to nginx-entrypoint

* chore: set file permission for custom image

accepted as per suggestion from users
not required for linux runners

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2023-01-21 16:48:53 +05:30
Revant Nandgaonkar
e9f28c9932 fix: set exec for nginx entrypoint (#1051)
for OS that mess up permission
2023-01-20 13:25:21 +05:30
Revant Nandgaonkar
6a1e3f3a20 docs: backup command for cron (#1048) 2023-01-18 13:16:50 +05:30
Revant Nandgaonkar
bb1e4bb341 feat: add restic (#1044)
* feat: add restic

allows incremental snapshot backups
remove custom push-backup script

* ci: remove .git dir to skip fetch_details_from_tag

fixes https://github.com/frappe/frappe_docker/actions/runs/3938883301/jobs/6738091655
2023-01-18 11:31:18 +05:30
github-actions
44df16fd04 chore: Update example.env 2023-01-17 16:14:52 +00:00
Revant Nandgaonkar
455a523205 fix: add weasyprint dependencies (#1047)
* fix: add weasyprint dependencies

fixes #1045

* ci: fix trigger to test pr

* fix: add weasyprint deps to bench
2023-01-17 17:12:27 +05:30
Revant Nandgaonkar
a270514eb1 fix: redis service context error (#1042)
https://discuss.frappe.io/t/service-redis-has-neither-an-image-nor-a-build-context-specified-invalid-compose-project/99936
2023-01-16 16:56:28 +05:30
Revant Nandgaonkar
7b193e3392 fix: remove git remotes for erpnext (#1041)
fix github rate limit error on bench install-app
2023-01-16 12:29:30 +05:30
Revant Nandgaonkar
44d6f237d5 fix: pass single string as arg (#1040)
fixes #1037
2023-01-16 10:07:00 +05:30
Revant Nandgaonkar
6e2e4d2143 fix: remove frappe version from .env (#1038) 2023-01-16 05:21:14 +05:30
dependabot[bot]
268cdcdec1 chore(deps): bump pytest from 7.2.0 to 7.2.1 (#1036)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.0...7.2.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-16 04:48:20 +05:30
github-actions
c913f27540 chore: Update example.env 2023-01-15 23:16:47 +00:00
Revant Nandgaonkar
e6088af885 refactor: build only one frappe/erpnext image (#1032)
* ci: skip frappe builds

* refactor: build only one frappe/erpnext image

* fix: lint nginx entrypoint script

* docs: update and organize docs

* docs: fix lint errors

* fix(custom): pass base64 encoded apps json

* ci: update dependabot

* docs: update contributing

* docs: remove info about multi image setup

* fix: initiate empty common_site_config.json

default config has host keys set to localhost
causes connection errors

* docs: add details for pwd volumes

* fix: symlink assets instead of copy

* fix: nginx private files

* ci: skip docker compose v2 install for ubuntu-latest

* fix: organize layers

* feat: allow remove git remote for custom image

* docs: allow remove git remote for custom image

* fix: remove duplicate --apps_path
2023-01-16 04:20:09 +05:30
github-actions
f8e43a3114 chore: Update example.env 2023-01-10 18:00:47 +00:00
github-actions
36f8e63c18 chore: Update example.env 2023-01-10 13:44:08 +00:00
github-actions
5799f87277 chore: Update example.env 2023-01-04 06:26:25 +00:00
github-actions
9859178907 chore: Update example.env 2023-01-04 03:07:01 +00:00
github-actions
cadaa0a0bf chore: Update example.env 2022-12-27 12:53:43 +00:00
github-actions
11fb3fdf60 chore: Update example.env 2022-12-27 10:08:33 +00:00
Bernhard Sirlinger
8f7b234a12 feat: make client_max_body_size configurable via env (#1029) 2022-12-27 03:12:22 +05:30
Bernhard Sirlinger
75e44ba902 feat: make proxy read timeout configurable via env (#975) 2022-12-25 13:23:55 +05:30
github-actions[bot]
e9a2512ba2 chore(deps): Update pre-commit hooks (#1027)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-12-22 19:18:40 +05:30
dependabot[bot]
a5667b0774 chore(deps): bump nginxinc/nginx-unprivileged in /images/nginx (#1026)
Bumps nginxinc/nginx-unprivileged from 1.23.2-alpine to 1.23.3-alpine.

---
updated-dependencies:
- dependency-name: nginxinc/nginx-unprivileged
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 19:58:16 +05:30
dependabot[bot]
ab59b25e12 chore(deps): bump actions/stale from 6 to 7 (#1025)
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 19:57:38 +05:30
github-actions
0f452571af chore: Update example.env 2022-12-20 14:17:22 +00:00
github-actions
fb39fd6415 chore: Update example.env 2022-12-20 10:46:23 +00:00
Revant Nandgaonkar
e721081f16 fix: mount assets on workers (#1022) 2022-12-20 15:26:28 +05:30
Siraj Samsudeen
b0cc2bffc7 updated link to Docker Manual with screenshots (#1013)
* updated link to Docker Manual with screenshots

* added 2 images to docs/images and linked them
2022-12-20 10:46:50 +05:30
github-actions[bot]
d85f54cd7b chore(deps): Update pre-commit hooks (#1023)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-12-18 21:36:47 +05:30
github-actions[bot]
41dd3149ff chore(deps): Update pre-commit hooks (#1021)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-12-17 18:12:33 +05:30
github-actions[bot]
a8adae2c84 chore(deps): Update pre-commit hooks (#1019)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-12-14 13:17:17 +05:30
github-actions
d15867fea3 chore: Update example.env 2022-12-13 12:35:58 +00:00
github-actions[bot]
01fdbfb226 chore(deps): Update pre-commit hooks (#1017)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-12-13 17:40:39 +05:30
github-actions
70c815b958 chore: Update example.env 2022-12-13 10:35:47 +00:00
dependabot[bot]
f48abb6244 chore(deps-dev): bump black from 22.10.0 to 22.12.0 (#1016)
Bumps [black](https://github.com/psf/black) from 22.10.0 to 22.12.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.10.0...22.12.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 17:31:22 +05:30
github-actions[bot]
45c6401da9 chore(deps): Update pre-commit hooks (#1015)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-12-10 13:52:56 +05:30
Revant Nandgaonkar
009877d67c fix: create config directory in worker image (#1014)
* fix: add git to worker image

* fix: create config directory in worker image
2022-12-10 13:52:37 +05:30
github-actions
19c5e5099c chore: Update example.env 2022-12-08 15:50:14 +00:00
github-actions[bot]
c6aa9e21c8 chore(deps): Update pre-commit hooks (#1011)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-12-08 18:43:57 +05:30
github-actions
d9fa219bb1 chore: Update example.env 2022-12-06 14:54:23 +00:00
github-actions
c35613d64b chore: Update example.env 2022-12-06 10:25:22 +00:00
github-actions[bot]
17197aca2c chore(deps): Update pre-commit hooks (#1007)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-12-04 04:17:42 +05:30
github-actions
51024d819d chore: Update example.env 2022-11-30 15:34:51 +00:00
github-actions[bot]
24b96ff6af chore(deps): Update pre-commit hooks (#1005)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-11-30 14:06:55 +05:30
github-actions
f683edc205 chore: Update example.env 2022-11-29 13:31:32 +00:00
github-actions
915fb780b6 chore: Update example.env 2022-11-29 10:43:51 +00:00
github-actions[bot]
41cba18a1a chore(deps): Update pre-commit hooks (#1003)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-11-24 14:08:39 +05:30
github-actions
77eac51125 chore: Update example.env 2022-11-22 16:14:45 +00:00
github-actions
933fc37209 chore: Update example.env 2022-11-22 13:24:14 +00:00
github-actions
e858078d30 chore: Update example.env 2022-11-15 13:15:51 +00:00
github-actions
b2f6bf1a48 chore: Update example.env 2022-11-15 11:07:31 +00:00
github-actions[bot]
7b5eac5d53 chore(deps): Update pre-commit hooks (#1001)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-11-11 15:57:07 +05:30
github-actions[bot]
ac039770dc chore(deps): Update pre-commit hooks (#1000)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-11-10 13:14:08 +05:30
github-actions
1d707e86be chore: Update example.env 2022-11-08 12:27:55 +00:00
github-actions
bf1f8b4c16 chore: Update example.env 2022-11-08 10:39:19 +00:00
Revant Nandgaonkar
63902fd427 fix(frappe-socketio): use package.json from frappe repo (#996)
fixes #994
2022-11-05 14:43:33 +05:30
github-actions
3661059667 chore: Update example.env 2022-11-04 15:58:35 +00:00
Smit Vora
e468921b5e fix: incorrect eval for bool in bash (#995) 2022-11-04 17:12:13 +05:30
github-actions
6c1e8c2c08 chore: Update example.env 2022-11-03 08:17:35 +00:00
Smit Vora
01bd8f6bb2 feat: install client apps using script (#992)
* feat: install client apps using script

* chore: ignore shellcheck pre-commit
2022-11-03 12:59:11 +05:30
github-actions
2a334a2724 chore: Update example.env 2022-11-01 17:32:13 +00:00
github-actions
ba3cadbc4f chore: Update example.env 2022-11-01 13:54:43 +00:00
github-actions[bot]
20eab28bab chore(deps): Update pre-commit hooks (#986)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-10-30 15:22:26 +05:30
Peter Dave Hello
bfd847eaca Prevent leaving pip install cache in Docker image (#985) 2022-10-28 18:45:44 +05:30
github-actions[bot]
d022634811 chore(deps): Update pre-commit hooks (#984)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-10-28 18:41:42 +05:30
github-actions
a42e97579f chore: Update example.env 2022-10-26 05:21:32 +00:00
github-actions
8b01439daa chore: Update example.env 2022-10-25 12:36:12 +00:00
dependabot[bot]
64257ecaa6 chore(deps): bump pytest from 7.1.3 to 7.2.0 (#982)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.3 to 7.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.3...7.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 16:49:25 +05:30
Babuuu
83f7db0c50 Use docker --chown command instead of RUN chown (#979)
The `RUN chown -R frappe:frappe /home/frappe` command was taking too long for me, over 6 minutes before I gave up and killed it. docker chown is faster, and it helps avoid creating a new layer.
2022-10-24 17:52:22 +05:30
dependabot[bot]
35b944d850 chore(deps): bump nginxinc/nginx-unprivileged in /images/nginx (#978)
Bumps nginxinc/nginx-unprivileged from 1.23.1-alpine to 1.23.2-alpine.

---
updated-dependencies:
- dependency-name: nginxinc/nginx-unprivileged
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-21 21:49:32 +05:30
dependabot[bot]
37b59843f5 chore(deps): bump webfactory/ssh-agent from 0.6.0 to 0.7.0 (#977)
Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/webfactory/ssh-agent/releases)
- [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webfactory/ssh-agent/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: webfactory/ssh-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-21 21:49:07 +05:30
github-actions[bot]
ceae7e9ba0 chore(deps): Update pre-commit hooks (#976)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-10-21 21:47:56 +05:30
dependabot[bot]
82cc15253a chore(deps): bump webfactory/ssh-agent from 0.5.4 to 0.6.0 (#971)
Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.5.4 to 0.6.0.
- [Release notes](https://github.com/webfactory/ssh-agent/releases)
- [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webfactory/ssh-agent/compare/v0.5.4...v0.6.0)

---
updated-dependencies:
- dependency-name: webfactory/ssh-agent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-19 14:23:26 +05:30
Revant Nandgaonkar
8e7f8b3b71 fix: install correct nodejs as per frappe version (#970)
fixes #967, #969
2022-10-19 14:22:07 +05:30
github-actions
fcb52d218f chore: Update example.env 2022-10-18 18:16:56 +00:00
github-actions
d0cd1f7afc chore: Update example.env 2022-10-18 11:49:15 +00:00
Imesha Sudasingha
36592fb3fd Update default NodeJS version in development/README.md (#968)
For the frappe version 14
2022-10-18 03:56:29 +05:30
Revant Nandgaonkar
ba68887e40 fix: install node and python envs for v13 (#963)
fixes #962
2022-10-16 13:38:16 +05:30
github-actions[bot]
6bfd1f926e chore(deps): Update pre-commit hooks (#960)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-10-15 17:45:56 +05:30
github-actions
a7aae8a000 chore: Update example.env 2022-10-12 12:38:00 +00:00
dependabot[bot]
8c9322b3a3 chore(deps): bump docker/bake-action from 2.2.0 to 2.3.0 (#957)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-12 16:40:16 +05:30
github-actions[bot]
cfb2f40158 chore(deps): Update pre-commit hooks (#956)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-10-12 05:09:36 +05:30
github-actions
41a155283e chore: Update example.env 2022-10-11 13:10:27 +00:00
github-actions
76de3b3ce8 chore: Update example.env 2022-10-11 10:39:28 +00:00
github-actions[bot]
1f78fe7204 chore(deps): Update pre-commit hooks (#955)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-10-10 13:07:29 +05:30
github-actions
289c2b7bfb chore: Update example.env 2022-10-07 12:53:50 +00:00
dependabot[bot]
34a0cfb5b0 chore(deps-dev): bump black from 22.8.0 to 22.10.0 (#953)
Bumps [black](https://github.com/psf/black) from 22.8.0 to 22.10.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.8.0...22.10.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-07 17:44:31 +05:30
github-actions[bot]
fdbcd4ff52 chore(deps): Update pre-commit hooks (#952)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-10-07 17:44:14 +05:30
Revant Nandgaonkar
02fcf42c7c fix: pwd add assets volume to queue (#951) 2022-10-06 12:13:56 +05:30
George Everitt
cb16ab9091 Added the --resolve-deps flag to dev install (#950)
Fixes #947
2022-10-05 10:58:44 +05:30
github-actions
f2c660492e chore: Update example.env 2022-10-04 12:29:15 +00:00
github-actions[bot]
a599f8d302 chore(deps): Update pre-commit hooks (#948)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-10-04 17:58:57 +05:30
github-actions
821a2be993 chore: Update example.env 2022-10-04 10:44:22 +00:00
github-actions
c90e787b6f chore: Update example.env 2022-09-28 10:06:31 +00:00
Arunkumar Ganesan
27ac6e2625 queue short added with mariadb network (#940)
Co-authored-by: ArunG <arung.sap@gmail.com>
2022-09-27 23:18:11 +05:30
github-actions
980eee9154 chore: Update example.env 2022-09-27 10:40:23 +00:00
github-actions[bot]
0446b8ee70 chore(deps): Update pre-commit hooks (#939)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-09-26 14:56:24 +05:30
github-actions[bot]
4d5c9c4095 chore(deps): Update pre-commit hooks (#937)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-09-26 03:36:12 +05:30
dependabot[bot]
06cbce1527 chore(deps): bump actions/stale from 5 to 6 (#934)
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-22 15:23:52 +05:30
github-actions
9bbe95fa99 chore: Update example.env 2022-09-20 18:46:21 +00:00
github-actions
c20078f41f chore: Update example.env 2022-09-20 12:05:44 +00:00
github-actions[bot]
8bc5bf6a6d chore(deps): Update pre-commit hooks (#917)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-09-18 10:36:02 +05:30
Jeffery CHEN Fan
301e4770a4 Update Dockerfile (#926) 2022-09-16 04:06:12 +05:30
github-actions
537e2d5afb chore: Update example.env 2022-09-14 14:04:18 +00:00
github-actions
2421f2befb chore: Update example.env 2022-09-13 12:25:04 +00:00
github-actions
380b1e06bf chore: Update example.env 2022-09-13 10:16:17 +00:00
Revant Nandgaonkar
ec584ba9c8 Deprecate assets builder (#922)
* feat: remove assets-builder image

* ci: remove version 12 builds

* fix: v13 nginx builds
2022-09-12 14:20:05 +05:30
Revant Nandgaonkar
2c1e5425b6 fix(bench): add dependencies to build python using pyenv (#920)
* fix(bench): add dependencies to build python using pyenv

fixes #840

* fix(bench): comment typo
2022-09-09 15:48:22 +05:30
github-actions
81ea33d56e chore: Update example.env 2022-09-06 16:16:36 +00:00
github-actions
61c8de5c08 chore: Update example.env 2022-09-06 11:16:47 +00:00
Revant Nandgaonkar
7fac6f3190 chore(deps): Update pre-commit hooks (#916) 2022-09-06 12:10:52 +05:30
dependabot[bot]
7ebd7d62b9 chore(deps): bump pytest from 7.1.2 to 7.1.3 (#914)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.2 to 7.1.3.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.2...7.1.3)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-06 10:06:35 +05:30
dependabot[bot]
2cb93e7315 chore(deps-dev): bump black from 22.6.0 to 22.8.0 (#909)
Bumps [black](https://github.com/psf/black) from 22.6.0 to 22.8.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.6.0...22.8.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-01 16:26:17 +05:30
github-actions
8065487c92 chore: Update example.env 2022-08-30 09:39:06 +00:00
github-actions
f60ed87ec8 chore: Update example.env 2022-08-30 07:56:06 +00:00
HENRY Florian
7e5d9c7f53 feat: remove version-12 dependencies (#898)
* feat: remove version-12 dependencies

* chore: Add in comment missing depdencies

* chore: Add in comment missing depdencies

* chore: Add in comment missing depdencies
2022-08-30 12:40:33 +05:30
github-actions
399def488e chore: Update example.env 2022-08-26 09:04:23 +00:00
github-actions
ea62cba300 chore: Update example.env 2022-08-24 06:30:02 +00:00
github-actions
b853d9e6bf chore: Update example.env 2022-08-23 05:41:03 +00:00
github-actions
f2790c8a36 chore: Update example.env 2022-08-23 04:21:07 +00:00
Salah Aldin Fateh
defcf83e37 edits on volumes definition (#886)
* Update compose.yaml

Delete the unnecessary volume definition and add read only to assets on backend

* Update compose.yaml

Delete the unnecessary volume definition and add read-only to assets on the backend
2022-08-22 12:20:02 +05:30
github-actions
019316b0e5 chore: Update example.env 2022-08-19 15:10:47 +00:00
Revant Nandgaonkar
bcfd470e33 chore(deps): Update pre-commit hooks (#883) 2022-08-19 13:59:41 +05:30
Revant Nandgaonkar
76dce27cf2 fix assets mount (#880)
* fix: mount assets on workers

fix #844

* fix: add codespell allowed word ro
2022-08-19 12:08:32 +05:30
github-actions[bot]
17d2baac1b chore(deps): Update pre-commit hooks (#877)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-08-19 10:16:10 +05:30
github-actions
1358ce839c chore: Update example.env 2022-08-18 08:46:39 +00:00
github-actions
65c8623e46 chore: Update example.env 2022-08-17 14:28:34 +00:00
github-actions
d97ee7add8 chore: Update example.env 2022-08-13 09:50:01 +00:00
github-actions
0bc44cfcdf chore: Update example.env 2022-08-11 13:32:04 +00:00
github-actions
c615b1c4bb chore: Update example.env 2022-08-03 10:53:47 +00:00
Revant Nandgaonkar
a20dd916d2 update: use v14 instead of v13 (#871) 2022-08-03 12:23:32 +05:30
Pazdo
67026915dd Fix for multiple simultaneous running stacks (#857)
* Add files via upload

* Updated networks

* Updated networks
2022-08-02 15:00:49 +05:30
Revant Nandgaonkar
6fa946a630 fix: install frappe/payments for v14 and develop (#867)
* fix: install frappe/payments for v14 and develop

* fix: test installs payments as per version

* fix: copy all apps for erpnext images

* fix: test installs payments on version-14

* fix: get_latest_tags script

* fix: docker build condition for v14
2022-08-02 06:01:13 +05:30
Talbi Youssef
5c74ff9407 First instead of second Typo (#862) 2022-07-28 18:39:29 +05:30
github-actions
d6acb0851b chore: Update example.env 2022-07-28 12:27:53 +00:00
github-actions
b1e5bb7379 chore: Update example.env 2022-07-28 08:03:45 +00:00
github-actions[bot]
e19574dcdf chore(deps): Update pre-commit hooks (#861)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-07-27 12:35:10 +05:30
Revant Nandgaonkar
c8682e4857 fix: use 3 redis services instead of 1 (#859)
* fix: use 3 redis services instead of 1

* fix: waititing for redis
2022-07-24 11:29:18 +05:30
dependabot[bot]
95711cc847 chore(deps): bump nginxinc/nginx-unprivileged in /images/nginx (#856)
Bumps nginxinc/nginx-unprivileged from 1.23.0-alpine to 1.23.1-alpine.

---
updated-dependencies:
- dependency-name: nginxinc/nginx-unprivileged
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-22 17:18:08 +05:30
github-actions
d5a6c09ba7 chore: Update example.env 2022-07-21 08:39:51 +00:00
github-actions
dad4b525f5 chore: Update example.env 2022-07-21 08:13:33 +00:00
dependabot[bot]
459f2efd8f chore(deps): bump docker/bake-action from 2.1.0 to 2.2.0 (#855)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 06:01:30 +05:30
github-actions[bot]
8a917fec02 chore(deps): Update pre-commit hooks (#854)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-07-21 06:01:04 +05:30
github-actions
07f655e583 chore: Update example.env 2022-07-20 16:04:19 +00:00
github-actions
98de31839a chore: Update example.env 2022-07-20 15:36:00 +00:00
github-actions
f3101e0a4f chore: Update example.env 2022-07-20 10:30:48 +00:00
github-actions
a230392064 chore: Update example.env 2022-07-18 05:37:18 +00:00
Mauricio Vidal
4e63052a54 Update setup-options.md (#850)
Link correction
2022-07-15 11:31:30 +05:30
github-actions
6bd457b33c chore: Update example.env 2022-07-14 08:23:04 +00:00
github-actions[bot]
6f97bfa07e chore(deps): Update pre-commit hooks (#848)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-07-13 04:03:03 +05:30
github-actions
f99649be91 chore: Update example.env 2022-07-12 09:45:22 +00:00
github-actions
bf49bf75ed chore: Update example.env 2022-07-12 08:06:13 +00:00
github-actions[bot]
cc7bf69ec6 chore(deps): Update pre-commit hooks (#846)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-07-12 04:09:59 +05:30
github-actions[bot]
a4bd7ff976 chore(deps): Update pre-commit hooks (#845)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-07-11 10:24:04 +05:30
github-actions
c25fd6271b chore: Update example.env 2022-07-08 10:33:24 +00:00
github-actions
fcf18ca709 chore: Update example.env 2022-07-05 09:02:07 +00:00
Revant Nandgaonkar
369e6dd31e docs: mention to install honcho in env (#839)
closes #816
2022-07-03 15:25:52 +05:30
Revant Nandgaonkar
1754e6872f add python 3.10 (#837)
* fix: use py 3.10 for v14

closes #836

* docs: update development readme for py versions

* ci: update github actions py version to 3.10

* Quote Python version in yaml files

* fix: typo in environment variable

Co-authored-by: Lev Vereshchagin <mail@vrslev.com>
2022-07-03 15:09:10 +05:30
dependabot[bot]
730e14b6cd chore(deps-dev): bump black from 22.3.0 to 22.6.0 (#834)
Bumps [black](https://github.com/psf/black) from 22.3.0 to 22.6.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.3.0...22.6.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-30 18:00:01 +05:30
github-actions[bot]
0b60d9a170 chore(deps): Update pre-commit hooks (#833)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-06-30 17:59:03 +05:30
github-actions
168f25dfbf chore: Update example.env 2022-06-28 07:44:44 +00:00
github-actions
3762696c40 chore: Update example.env 2022-06-28 06:32:48 +00:00
dependabot[bot]
06f7a551ad chore(deps): bump docker/bake-action from 2.0.0 to 2.1.0 (#832)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-27 14:29:07 +05:30
saiyam morakhiya
b58a1a6d6f Update Socketio Dockerfile (#831)
Changing user to frappe makes all after commands make executable under frappe user except COPY command so trying with externally specifying with --chown=frappe:frappe
2022-06-26 04:18:48 +05:30
Marco
2b6c8b6fa9 Update nginx-template.conf (#828) 2022-06-24 11:59:27 +05:30
dependabot[bot]
e731ba1950 chore(deps): bump nginxinc/nginx-unprivileged in /images/nginx (#827)
Bumps nginxinc/nginx-unprivileged from 1.21.6-alpine to 1.23.0-alpine.

---
updated-dependencies:
- dependency-name: nginxinc/nginx-unprivileged
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-24 11:34:08 +05:30
github-actions
3e5f34a710 chore: Update example.env 2022-06-21 11:32:17 +00:00
github-actions
a249ed4c81 chore: Update example.env 2022-06-21 05:44:01 +00:00
github-actions[bot]
585ed6a7d9 chore(deps): Update pre-commit hooks (#823)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-06-17 14:19:27 +05:30
github-actions[bot]
45ff41d8bc chore(deps): Update pre-commit hooks (#822)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-06-15 15:45:44 +05:30
github-actions
8816da8097 chore: Update example.env 2022-06-14 08:00:40 +00:00
github-actions
b972bcfab2 chore: Update example.env 2022-06-14 06:23:05 +00:00
dependabot[bot]
8065f9760b chore(deps): bump actions/setup-python from 3 to 4 (#819)
* chore(deps): bump actions/setup-python from 3 to 4

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* ci: set setup-python@v4 python-version for lint

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2022-06-13 15:27:24 +05:30
github-actions
a3ce77fcf1 chore: Update example.env 2022-06-13 06:47:11 +00:00
github-actions
b0b6f5318e chore: Update example.env 2022-06-11 07:28:47 +00:00
github-actions[bot]
2bc21c087e chore(deps): Update pre-commit hooks (#818)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-06-08 13:27:03 +05:30
github-actions[bot]
37074dce29 chore(deps): Update pre-commit hooks (#817)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-06-08 04:59:45 +05:30
github-actions
118b248581 chore: Update example.env 2022-06-07 10:15:50 +00:00
github-actions
c6108689dd chore: Update example.env 2022-06-07 09:54:26 +00:00
github-actions
f466495593 chore: Update example.env 2022-05-31 13:26:26 +00:00
github-actions
38ed43fc35 chore: Update example.env 2022-05-27 07:03:34 +00:00
github-actions
b8ea483461 chore: Update example.env 2022-05-26 05:47:13 +00:00
Abhirup Pal
a020885206 Fix container name in documentation. (#810) 2022-05-23 14:34:48 +05:30
github-actions
54629a8c78 chore: Update example.env 2022-05-20 09:01:52 +00:00
github-actions
27f0430544 chore: Update example.env 2022-05-17 07:56:44 +00:00
github-actions
a20d6246ad chore: Update example.env 2022-05-17 07:26:35 +00:00
github-actions
733d091ec2 chore: Update example.env 2022-05-13 07:54:46 +00:00
github-actions
3a22cc3b11 chore: Update example.env 2022-05-12 10:17:34 +00:00
github-actions
f1137a50a8 chore: Update example.env 2022-05-10 10:40:02 +00:00
github-actions
c73b2e5d38 chore: Update example.env 2022-05-10 09:29:07 +00:00
Safwan Erooth
75b83237a0 docs: fixed app installation command. (#802)
- In the app installation step, the command has been fixed.
- also changed the example command to use version 13 of ERPNext instead of 12
2022-05-07 10:15:41 +05:30
dependabot[bot]
d5a54fe5a6 chore(deps): bump docker/setup-buildx-action from 1 to 2 (#798)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 18:24:44 +03:00
dependabot[bot]
b54591cae6 chore(deps): bump docker/bake-action from 1.7.0 to 2.0.0 (#799)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 1.7.0 to 2.0.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v1.7.0...v2.0.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 18:24:32 +03:00
dependabot[bot]
78a2079b40 chore(deps): bump docker/login-action from 1 to 2 (#800)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 18:23:47 +03:00
dependabot[bot]
a9f3a15d29 chore(deps): bump docker/setup-qemu-action from 1 to 2 (#801)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-06 18:23:28 +03:00
github-actions[bot]
3926095d81 chore(deps): Update pre-commit hooks (#797)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-05-06 04:22:55 +05:30
github-actions
332f7f3b15 chore: Update example.env 2022-05-03 09:08:53 +00:00
github-actions
87c23025e2 chore: Update example.env 2022-05-03 08:21:25 +00:00
Revant Nandgaonkar
ed6efe5cf4 docs: fix port based multi tenancy (#795) 2022-05-02 14:01:36 +05:30
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
Lev
9f502c8538 Fix builds failing (#793)
* Fix builds failing
Fixes #792

* Suppress `docker compose down` errors in cleanup

* Cover all cases

* Fix linting

* Remove unused import
2022-05-02 03:58:25 +05:30
github-actions
ed5311473c chore: Update example.env 2022-04-26 07:58:42 +00:00
dependabot[bot]
dca3e82df6 chore(deps): bump pytest from 7.1.1 to 7.1.2 (#788)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.1 to 7.1.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.1...7.1.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 18:54:16 +05:30
Revant Nandgaonkar
5fbd9bdda5 feat: optional bucket directory for push-backup (#784) 2022-04-20 05:09:56 +05:30
github-actions
c9258ae843 chore: Update example.env 2022-04-19 11:00:10 +00:00
github-actions
e2768a93f6 chore: Update example.env 2022-04-13 09:32:39 +00:00
Byju Abraham
76cfbd6468 Add the base URL to the rewrite rules in the nginx config template (#779)
* Add the base URL to the rewrite rules in the nginx config template

* Replace forced HTTPS with nginx variable

* ci: fix inputs.platforms (#782)

* ci: fix inputs.platforms

* ci: remove inputs.platforms

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2022-04-13 12:19:35 +03:00
Revant Nandgaonkar
53a0e1a7ba ci: fix inputs.platforms (#782)
* ci: fix inputs.platforms

* ci: remove inputs.platforms
2022-04-13 12:37:55 +05:30
Revant Nandgaonkar
d3906b2620 ci: do not build arm64 images (#777)
* ci: do not build arm64 images

* ci: do not build arm64 images for develop branch

* ci: remove common setup qemu step

* ci: remove common setup platform inputs
2022-04-11 21:30:54 +05:30
dependabot[bot]
0b952833b7 chore(deps): bump actions/setup-go from 2 to 3 (#775)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 15:24:48 +03:00
dependabot[bot]
c3624ac417 chore(deps): bump actions/stale from 4 to 5 (#774)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 15:24:27 +03:00
Revant Nandgaonkar
5edac4c12a feat: allow custom git repos (#771)
fixes #770
2022-04-11 10:30:16 +05:30
github-actions[bot]
bc915f7b34 chore(deps): Update pre-commit hooks (#766)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-04-10 04:00:50 +05:30
tyt11123
700f1fafd1 Update multi-bench yaml (#767) 2022-04-10 04:00:00 +05:30
github-actions
435c9a2f2c chore: Update example.env 2022-04-09 15:22:06 +00:00
github-actions[bot]
038a8c0271 chore(deps): Update pre-commit hooks (#765)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-04-07 16:12:14 +05:30
github-actions
c0b1881389 chore: Update example.env 2022-04-06 19:49:35 +00:00
github-actions
37dba7188a chore: Update example.env 2022-04-06 16:17:59 +00:00
Revant Nandgaonkar
b83938c0b8 docs: remove obsolete swarm related documentation (#763) 2022-04-06 15:33:40 +05:30
Revant Nandgaonkar
027c905355 ci: build v14 images (#759)
* ci: build v14 images

build v14* images

* fix: lint get_latest_tags.py
2022-04-06 12:44:39 +05:30
Revant Nandgaonkar
78ca6a9f8f fix: config commands (#762) 2022-04-06 10:56:04 +05:30
Revant Nandgaonkar
149d11785a fix: pwd assets and sites location (#760) 2022-04-06 05:49:59 +05:30
Revant Nandgaonkar
ba1902ad80 docs: use additional service during development (#758) 2022-04-06 05:08:26 +05:30
Lev
f39fe05fca Use relative path to reusable workflow docker-build-push (#755)
Previously it was not allowed, now it is. Potentially there will be less bugs on changes.
2022-04-04 15:06:30 +05:30
Revant Nandgaonkar
fda82636b1 feat: add PWD button (#754)
* feat: add PWD button

* ci: change update versions workflow name
2022-04-04 15:02:08 +05:30
github-actions[bot]
5483abcc58 chore(deps): Update pre-commit hooks (#753)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-04-04 11:01:56 +03:00
Al Majumdar
1fba893504 Add platforms to bake file to include m1 (arm64) (#733)
* add platforms to bake file to include m1 (arm64)

* add platforms to bake file to include m1 (arm64)

* rebased to latest main

* update docker/bake-action to latest version

* test action fix

* add qemu step

* revert to older version of bake

* remove arm64 from breaking build

* test with vanilla buildx

* cleanup

* added platforms directive to default args

* use build_push from current branch

* explicit build_push dependency

* use build push from current branch

* specify branch name

* experiment with syntax

* use commit id for tag

* experiment to extract branch from context

* ditto

* one more variation

* revert

* revert build push to version in current main

* added comment to force build

* force another build

* comment out build on PR

* test if event is pull request

* first test, event is "none"

* fix typo

* correct syntax

* set event name correctly

* explicit variable for multi arch build

* test multi arch build

* test negated conditional

* enable PR build

* use env variable to control multi arch

* test with env var

* revert

* revert

* try syntax variation

* check val

* try variation

* add platforms

* re-enable PR builds

* revert file

* untested but should work

* switch from env var to input for action

* test against restlessronin branch

* fix typo

* cleanups

* revert action link

* refactor to explicit platform list

* try variation

* remove env toggle

* retry

* try multi build

* ternary workaround

* cleanup

* revert action branch

* fix typo

* yat

* revert to origin CI action

* post review changes (untested)

* no arm for v12
2022-04-03 16:18:36 +03:00
Revant Nandgaonkar
832c44c8ea fix: gunicorn config for containers (#752) 2022-04-03 15:45:39 +03:00
Lev
6fa358ca4e Build for v12 (#750)
* Build for v12

Typo!!

* Fix Python 3.7 compatibility

* Skip assets endpoint test on v12
2022-04-03 15:57:22 +05:30
PlaidDroid
a389c3a175 Fix file name (#748)
erpnext.yaml > compose.erpnext.yaml
2022-04-03 12:29:36 +05:30
Revant Nandgaonkar
1448e46a9b docs: single server setup example (#715)
* docs: single server setup example

* docs: lint single server setup example

* docs: LAN based setup

* docs: fix traefik ssl override

* docs: move data directory to user home

* docs: remove env-file from exec commands
2022-04-03 12:26:46 +05:30
Lev
ca9761585a Remove git reference from install-app (#742)
* Remove git reference from install-app
Also fixed issue with missing sites/assets folder

* Update custom app guide according to changes

* Ignore apps that have no frontend code instead of failing
2022-03-30 12:09:09 +03:00
Lev
6759bebab5 Add color to pytest output in CI (#743) 2022-03-29 12:36:21 +03:00
github-actions
2407ed736f chore: Update example.env 2022-03-29 09:21:27 +00:00
github-actions[bot]
486b36ca76 chore(deps): Update pre-commit hooks (#739)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-03-29 11:57:02 +03:00
dependabot[bot]
3d05f785ca chore(deps-dev): bump black from 22.1.0 to 22.3.0 (#741)
Bumps [black](https://github.com/psf/black) from 22.1.0 to 22.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.1.0...22.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-29 11:56:19 +03:00
Al Majumdar
21fdeee837 add QEMU action (#737) 2022-03-28 20:53:14 +03:00
github-actions[bot]
94930b04be chore(deps): Update pre-commit hooks (#734)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-03-26 19:14:58 +03:00
github-actions
c0e24f4543 chore: Update example.env 2022-03-26 05:29:40 +00:00
dependabot[bot]
d8cbaa5e4a chore(deps): bump pytest from 7.1.0 to 7.1.1 (#732)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.0 to 7.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.0...7.1.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 11:38:47 +03:00
Lev
269156ff7d Fix develop build (#731)
* Prevent tests from modifying $GITHUB_ENV

This fixes develop build.

* Update frappe git url in dev requirements

* Update
2022-03-24 11:30:19 +03:00
Lev Vereshchagin
144baf9239 Fix CI tests 2022-03-24 10:56:10 +03:00
Lev
57d273c512 Update contributing guide (#730) 2022-03-24 10:42:00 +03:00
Lev
41ba718b21 Use pytest (#705)
* Use pytest for tests

* Pin black

* Update CI

* Rename test_main to test_frappe_docker

* Force project name "test"
2022-03-24 10:40:56 +03:00
Lev
1d5a0859a8 Add install-app script in final backend image (#729) 2022-03-24 10:38:45 +03:00
Lev
28a588b402 Fix example.env workflow failures (#728) 2022-03-24 10:11:48 +03:00
github-actions
ceab853dab chore: Update example.env 2022-03-23 09:10:26 +00:00
dependabot[bot]
6f2e48d3e8 chore(deps): bump peter-evans/create-pull-request from 3 to 4 (#725)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-23 11:56:40 +03:00
Lev
f86b389466 Simplify Dockerfiles and custom app guide (#714)
* Add assets builder image

* Use assets builder in custom_app tutorial

* Use erpnext in custom app tutorial

* Add info about base images (frappe or erpnext)

* Add assets-builder image to frappe group so it is built in CI

* Update backend image:
- Fix mounted caching
- Uncomplicate ERPNext build
- Fix root-frappe permissions

* Add build-assets script for simpler frontend build

* Add install-app script for backend build

* Rename build-assets to install-app for frontend build

* Update custom app builds according to new main dockerfiles

* Cache pip packages in custom app example backend dockerfile

* Update custom app guide

* Fix typo in backend dockerfile

* Add info about install-app scripts in readme
2022-03-23 11:43:47 +03:00
dependabot[bot]
2ef5c41420 chore(deps): bump actions/cache from 2 to 3 (#723)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-23 11:09:07 +03:00
github-actions
f28072722a chore: Update example.env 2022-03-21 05:31:45 +00:00
Jonas Weigand
4e1a5641c6 Update docs to advise for docker-compose v2 (#712)
This change is to inform users to use docker-compose v2. Using v1 can cause problems when parsing the final docker-compose.yaml. Mitigates #701
2022-03-19 11:03:11 +05:30
Lev
d4469cfb64 fix: Letterheads missing (#704)
* fix: Letterheads missing
Fixes #703

* empty
2022-03-18 16:20:39 +05:30
RashiqAzhan
10d2172bd8 Fix broken link in docs. (#710) 2022-03-17 16:21:10 +03:00
github-actions[bot]
1dd6e08b47 chore(deps): Update pre-commit hooks (#708)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-03-17 10:22:40 +03:00
github-actions
3b4b539607 chore: Update example.env 2022-03-17 04:05:55 +00:00
Revant Nandgaonkar
79760daf9b fix: link frappe node_modules to make Website Theme work (#702)
* fix: link frappe node_modules to make Website Theme work

* Add website theme test

* Fix failing test

Co-authored-by: Lev Vereshchagin <mail@vrslev.com>
2022-03-16 13:39:16 +03:00
Al Majumdar
51319db0f4 update to VS Code version 1.64.2 (#675)
* update to VS Code version 1.64.2

* Make changes appropriate to refactor

Co-authored-by: Lev Vereshchagin <mail@vrslev.com>
2022-03-15 08:38:06 +03:00
Lev
1fff78ed82 Move Traefik config to appropriate override (#698)
Fixes #690
2022-03-15 05:06:46 +05:30
Lev
437afb1776 Make build workflows run if files that they're are described in change (#696)
* Make build workflows run if files that they're are described in change (closes #691)

* Update
2022-03-14 13:20:39 +03:00
dependabot[bot]
8ce210c532 chore(deps): bump actions/setup-python from 2 to 3 (#682)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 12:57:30 +03:00
github-actions[bot]
688ab6b3b9 chore(deps): Update pre-commit hooks (#692)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-03-14 12:36:49 +03:00
dependabot[bot]
7831a097c4 chore(deps): bump nginxinc/nginx-unprivileged in /images/nginx (#684)
Bumps nginxinc/nginx-unprivileged from 1.20-alpine to 1.21.6-alpine.

---
updated-dependencies:
- dependency-name: nginxinc/nginx-unprivileged
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 09:13:55 +03:00
github-actions
faa42c69d4 chore: Update example.env 2022-03-14 06:09:41 +00:00
Lev
a9b6b755ce Global refactoring (#617)
* Rename `bench-build` target to `bench` in bake file

* Update bake file and break everything

* Rename docker-compose.yml to compose.yml to avoid conflicting on `docker buildx bake`

* Fix groups in bake file

* Update frappe-worker

* Update frappe-nginx, erpnext-nginx

* Remove old erpnext images

* Update frappe-socketio

* Fix develop frappe-nginx build on linux/arm64

* Update dockerignore

* Update gitignore

* Update gitignore

* Update .env files

* Update installation (overrides)

* Update tests

* Fix image names

* Update compose

* Update get-latest-tags

* Update CI

* Setup and remove .env on tests

* Add build bench workflow

* Add triggers to main workflow

* Add release helm job

* Use reusable workflows

* Rollback

* Print configuration before running tests

* Show tests/.env

* Revert "Show tests/.env"

This reverts commit 4bc3bdebaf.

* Fix ci image versions

* Remove `frappe-` prefix in build directories

* Move requirements-dev.txt

* Fix image name in CI

* Update gitignore

* Update pre-commit config

* Drop `version:` in compose files

* Add push-backup

* Fix postgres CI test

* Change .yml to .yaml in compose file to follow compose-spec

* Remove prettierignore

* Fix dockerignore

* Change .yml to .yaml in compose file to follow compose-spec

* Don't depend on boto3 while testing (do it in backend)

* Update erpnext example version

* Don't fail ping on URLError

* Move assets volume to main compose file

* Fix type annotations for v12

* Fix postgres ci override in tests

* Fix spaces in socketio

* Reorder stages in nginx image, improve perfomance

* Remove unused todo

* Optimize worker build

* Install Node in worker image

* Add 502 error page

* Remove unused quiet-pull in tests

* Add configurator service to dynamically set common config

* Remove unused compose.ci-postgres.yml

* Use Python for configurator service: faster and more robust

* Add TODO.md

* Use python script to get latest tags in CI

* Clean up nginx dockerfile

* Remove VOLUME declaration

https://stackoverflow.com/a/55052682

* Add custom app example

* Remove pwd for now

* Remove pwd for now

* Use jq for parsing config in healthcheck

* Take advantage of yaml lang: add defaults in compose file. Also require env vars

* Fix CI

* Use resusable workflow

* Update

* Move release_helm job to main.yml

* Rename docker-build to docker-build-push

* Rename main to build_stable

* Rename bench targets

* Remove quotes from docker-build-push inputs

* Update build develop

* Remove HELM_DEPLOY_KEY secret from docker-build-push

* Add job names

* Remove build_bench workflow

* Update version input description in docker-build-push

* Print .env in tests, if version is develop, change to latest (for tag)

* Fix env setup

* Uncomment tests

* Parse and set short tags from git tag in bake file

* Move devcontainer settings to devcontainer.json

* Add db command notice

* Fix CI?

* Fix inconsistencies in development readme

* Remove pwd for now

* Remove custom apps for production instruction

* Update todos

* Add docs for images and compose files

* Add variables docs and allow custom frappe site name header

* Add notice about internal environment variables

* Update site-operations docs

* Update todos

* Add Overrides header in images-and-compose-files

* Update todos

* Remove extra docs

* Don't log requests in worker image (nginx already does that)

* Remove default value of FRAPPE_SITE_NAME_HEADER in example.env

* Use file that consistent in v12, v13 and develop to check /assets

* Fix paths in CI

* Update todos

* Remove TODO.md

* Update tests/_check_backup_files.py

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>

* Change variables MINIO_ACCESS_KEY and MINIO_SECRET_KEY to S3_ACCESS_KEY, S3_SECRET_KEY in tests

* Fix S3 test

* Use `nginxinc/nginx-unprivileged` instead of `nginx` image

Also use Ngnix 1.20 instead of unstable 1.21

* Fix https override

* Update Dockerfile

* Mount assets to backend service in read only mode

* Touch .build (#307), use scripts from nginx image to generate config and touch .build

* Update example env after building stable images

* Touch `.build` on develop image (untill https://github.com/frappe/frappe/issues/15396 is resolved)

* Add `make` to worker build deps for linux/arm64

* Fix update example.env job

* Fix .build creation on develop branch

* Move bench CI to different file

This way workflow runs only on PRs that relevant to bench build

* Fix app name in custom app example

* Update erpnext and frappe versions in example.env

* Don't install `svg-sprite` and `sass` node modules in nginx image on linux/arm64 (https://github.com/frappe/frappe/pull/15275)

* docs: README and docs

* docs: add link to site operations from docker swarm

* ci: fix tests as per changes to compose.yaml

* docs: move wiki articles to docs

* docs: fix add custom domain

* docs: fix patch code from images

* fix: do not expose port 80 for old images

* fix: custom domain labels to frontend container/service

* Add missing descriptions to envs in example.env

* Fix redis depends_on

* Fix docker compose in tests when not running on TTY

* Set -T flag in `docker compose exec` only if not tty

* Run pre-commit on docs

* Remove postgres healthcheck (it gets overriden by mariadb)

* Refactor test

* Update workflow names

* Add pip to dependabot config

* docs: backup and push (#19)

* Beautify changes by @revant (#20)

* feat: add gevent to worker image

* feat: real_ip configuration for nginx

* Return `healthcheck.sh` just for tests

Co-authored-by: Lev Vereshchagin <mail@vrslev.com>

* Make pretend bench catch unknown commands (closes #666)

* Remove debug print in push-backup

* Fix typing issues in push-backup

* Update file keys in push-backups: from abs path to <site>/<file>

* Refactor push-backup

* Move gevent installation in Frappe step

* Don't pin boto stubs requirement

* Cache pip deps on build

* Update example env versions

* Refactor check backup files

* Fix backup test

* Fix backup test

* Rename build/ dir to images/

* Rename build/ dir to images/

* Fix /build -> /images in docs

* Update example.env

* Use reusable workflow in frappe user instead of vrslev

* Fix compose`s `project` option in docs (https://github.com/frappe/frappe_docker/pull/617#issuecomment-1065178792)

* Add note about project option in site-operations doc

* Update example env

* Rename build arg `USERNAME` to `REGISTRY_USER`

* Allow https proxy to access Docker socket

* Revert "Use reusable workflow in frappe user instead of vrslev"

This reverts commit 6062500d0d.

* Revert "Revert "Use reusable workflow in frappe user instead of vrslev""

This reverts commit 4680d18ff8.

Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
2022-03-14 11:23:03 +05:30
Lev
95aeb32e2d fix: new site command on Frappe >13.21.0 (#677) 2022-03-08 13:28:11 +03:00
dependabot[bot]
e1f32b7476 chore(deps): bump actions/checkout from 2 to 3 (#673)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-04 22:35:27 +03:00
dependabot[bot]
cc5c0b6485 chore(deps): bump actions/setup-python from 2 to 3 (#672)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 10:12:53 +03:00
dependabot[bot]
66fca59f74 chore(deps): bump docker/bake-action from 1.6.0 to 1.7.0 (#665)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 09:05:23 +03:00
Babuuu
3ba01027de Change mysql.user to mysql.global_priv -> for MariaDB 10.4+ (#650)
Co-authored-by: meradoch <meradoch@notdeadeyes.notdeadeyes>
2022-02-12 17:39:15 +05:30
Lev
8e34d092f8 Fix pre-commit config (#657)
* Fix pre-commit config

* Lint settings.json
2022-02-08 12:27:54 +03:00
Lev
05853825d8 build: Change bench target names and move CI to separate workflow (#655)
* Change bench target names and move CI to separate workflow

* Fix file detection
2022-02-08 11:35:52 +03:00
github-actions[bot]
b02191f3f8 chore(deps): Update pre-commit hooks (#652)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-02-06 21:43:22 +05:30
Vaibhav Chopra
55a4dc9269 Update settings.json (#648)
removes a squiggly line whenever doing imports like 
```
from frappe.model.document import Document
```
2022-02-02 17:25:19 +05:30
github-actions[bot]
7404bcadee chore(deps): Update pre-commit hooks (#644)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-01-31 12:13:43 +03:00
Nicolás Bottini
18a16372b2 Update references to $ERPNEXT_VERSION (#631)
* Update references to $ERPNEXT_VERSION

Documentation is making references to an unexisting $VERSION variable. I'm updating it to $ERPNEXT_VERSION.

* Update site-operations.md to use $FRAPPE_VERSION 

Fix references to $ERPNEXT_VERSION when using frappe/frappe-worker so now it uses $FRAPPE_VERSION
2022-01-12 12:41:50 +05:30
Robproject
42bfd485f8 Change erpnext-python volumes description (#628) 2022-01-07 14:05:04 +05:30
github-actions[bot]
52f91b318c chore(deps): Update pre-commit hooks (#625)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2022-01-05 18:45:56 +03:00
github-actions[bot]
a46a97dc81 chore(deps): Update pre-commit hooks (#623)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2021-12-30 09:59:56 +03:00
vrslev
d573ba8769 chore(deps): Update pre-commit hooks 2021-12-26 13:15:30 +03:00
vrslev
4daa31e1cf chore(deps): Update pre-commit hooks 2021-12-24 13:45:18 +03:00
github-actions[bot]
c2b1543128 chore(deps): Update pre-commit hooks (#618)
Co-authored-by: vrslev <vrslev@users.noreply.github.com>
2021-12-19 14:01:18 +05:30
Lev
adaa753d89 fix: Bench initialization with ERPNext v12 on frappe/bench (#613) 2021-12-11 13:57:10 +05:30
vrslev
e665b014ca chore(deps): Update pre-commit hooks 2021-12-11 10:44:51 +03:00
Lev
6b93efdf3c chore: Rename LICENSE.md to LICENSE (#608) 2021-12-10 16:25:57 +05:30
Lev
407ac2f836 ci: Remove greetings workflow (#610)
It is quite annoying, not very useful and takes 30–50 seconds to finish
2021-12-10 16:24:48 +05:30
Lev
db7823a2e2 chore(lint): Take hooks configs out so linting works without pre-commit too (#609) 2021-12-10 12:31:44 +03:00
Lev
3171f212ab Merge pull request #607 from vrslev/run-pre-commit
chore: Run pre-commit
2021-12-10 12:26:45 +03:00
Lev Vereshchagin
0b861de117 chore(lint): Run shfmt 2021-12-10 11:56:18 +03:00
Lev Vereshchagin
be7c6254f8 chore(lint): Run codespell 2021-12-10 11:54:51 +03:00
Lev Vereshchagin
1c9c4bd780 chore(lint): Change exclude in codespell hook 2021-12-10 11:54:27 +03:00
Lev Vereshchagin
fb07581595 chore(lint): Run prettier 2021-12-10 11:53:43 +03:00
Lev Vereshchagin
8b4dfce4f0 chore(lint): Run isort 2021-12-10 11:53:00 +03:00
Lev Vereshchagin
f8b7b7af05 chore(lint): Run black 2021-12-10 11:52:40 +03:00
Lev Vereshchagin
c4772bc5b5 chore(lint): Run pyupgrade 2021-12-10 11:51:47 +03:00
Lev Vereshchagin
3e4e66769b chore(lint): Run end-of-file-fixer 2021-12-10 11:51:11 +03:00
Lev Vereshchagin
9f0d602c72 chore(lint): Fix trailing-whitespace 2021-12-10 11:50:39 +03:00
Lev
2ac2b7ce43 chore: Use pre-commit framework (#604)
* Add pre-commit, prettier configs and editorconfig

* Remove `check-toml` hook

* Add isort config

* Add codespell config

* Update hooks

* Remove prettierignore

* Add shellcheck config

* Add lint workflow

* Add pre-commit autoupdate workflow

* Remove path constraints from lint workflow

* Fix CI

* Add guide to CONTRIBUTING.md

* Fix (probably) shfmt

* Fix (probably) shfmt

* Fix (probably) shfmt
2021-12-10 11:48:00 +03:00
Revant Nandgaonkar
65f6228be8 fix: update devcontainer mariadb (#605) 2021-12-06 17:55:24 +05:30
Lev
e629dd313e chore: Fix pwd url and move pwd.yml away from tests directory (#603) 2021-12-05 18:56:21 +03:00
Lev
399414bcab fix: Remove --log.level=DEBUG from traefik command to reduce log verbosity (#600) 2021-12-05 16:49:02 +05:30
Lev
6378473c43 fix(bench): Set BENCH_DEVELOPER env var in bashrc instead of Dockerfile (#598) 2021-12-05 16:45:50 +05:30
Lev
442c767338 ci(lint): Specify paths that trigger workflow (#601) 2021-12-05 12:44:34 +03:00
Lev
a48ae2d12e ci: Move greetings.yml to appropriate folder (#599) 2021-12-05 12:24:09 +03:00
Lev
81ec8da94f feat: Upgrade mariadb and use command instead of copying config file (#597) 2021-12-05 14:32:08 +05:30
Lev
180b9ababc docs: Update CONTRIBUTING.md (#594) 2021-12-03 05:06:58 +05:30
Lev
9b49391dbb feat(bench): Don't show editable-bench warnings (#593) 2021-12-02 20:36:07 +05:30
Chinmay Pai
c87ee80a22 Merge pull request #592 from revant/feat-allow-devcont-config 2021-11-30 23:28:16 +05:30
Revant Nandgaonkar
aadb0a8139 feat: allow devcontainer vscode configuration 2021-11-30 17:27:25 +05:30
Revant Nandgaonkar
0af1302485 fix: install py 3.7 using pyenv (#590)
* fix: install py 3.7 using pyenv

* fix: set pyenv global versions

* refactor: cleaup code
2021-11-30 16:03:01 +05:30
Lev
9a986575f6 ci: Fix paths that trigger workflows (#587) 2021-11-26 19:52:17 +05:30
Lev
5aae67117c Build ERPNext images on top fresh Frappe images (#582)
Update build_stable.yml
2021-11-24 05:10:27 +05:30
Revant Nandgaonkar
d049e33b40 Merge pull request #579 from frappe/dependabot/github_actions/webfactory/ssh-agent-0.5.4
chore(deps): bump webfactory/ssh-agent from 0.5.3 to 0.5.4
2021-11-22 19:13:42 +05:30
dependabot[bot]
a9c3f6e9b9 chore(deps): bump webfactory/ssh-agent from 0.5.3 to 0.5.4
Bumps [webfactory/ssh-agent](https://github.com/webfactory/ssh-agent) from 0.5.3 to 0.5.4.
- [Release notes](https://github.com/webfactory/ssh-agent/releases)
- [Changelog](https://github.com/webfactory/ssh-agent/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webfactory/ssh-agent/compare/v0.5.3...v0.5.4)

---
updated-dependencies:
- dependency-name: webfactory/ssh-agent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 10:06:05 +00:00
Revant Nandgaonkar
e4ab6945a4 Merge pull request #576 from revant/change-nginx-port
fix: change unpriviliged nginx port from 80 to 8080
2021-11-22 15:18:57 +05:30
Revant Nandgaonkar
1427907a82 ci: revert shell script functions 2021-11-22 13:22:09 +05:30
Revant Nandgaonkar
91648299ba ci: fix test and revert yamls 2021-11-22 13:17:17 +05:30
Revant Nandgaonkar
d68bcdc8bd ci: output erpnext-nginx container logs 2021-11-22 06:14:30 +05:30
Revant Nandgaonkar
8fc3fbb27e ci: fix lint 2021-11-22 05:36:59 +05:30
Revant Nandgaonkar
4f7108c3a8 ci: check connections before curl 2021-11-22 05:22:12 +05:30
Revant Nandgaonkar
cb2943bdf7 ci: reload volume permissions 2021-11-21 22:37:22 +05:30
Revant Nandgaonkar
318f65170a ci: fix test volume permissions 2021-11-21 21:39:19 +05:30
Revant Nandgaonkar
3295c8070e fix: change unpriviliged nginx port from 80 to 8080 2021-11-21 16:23:32 +05:30
Revant Nandgaonkar
6b6a1b9ad8 Merge pull request #572 from revant/fix-erpnext-build
ci: fix erpnext build
2021-11-19 22:46:58 +05:30
Revant Nandgaonkar
9bfb3abde4 ci: fix erpnext nginx build permissions 2021-11-19 22:02:50 +05:30
Revant Nandgaonkar
593dfe444a ci: fix erpnext build 2021-11-19 20:41:23 +05:30
Chinmay Pai
abe6d670c4 Merge pull request #570 from revant/unprivileged-nginx 2021-11-19 09:05:57 +05:30
Revant Nandgaonkar
56c3341d74 Merge pull request #569 from Meradoch/patch-1
Fix permission denied error
2021-11-19 04:06:08 +05:30
Revant Nandgaonkar
c04edf8b6b fix(frappe-nginx): install python2 for v12 builds 2021-11-18 23:55:02 +05:30
Revant Nandgaonkar
8634460315 fix(frappe-nginx): create /assets dir 2021-11-18 22:48:22 +05:30
Revant Nandgaonkar
ef31d8e025 feat(frappe-nginx): use nginxinc/nginx-unprivileged image 2021-11-18 22:23:54 +05:30
Meradoch
2fa61e9868 Proposed changes to fix permission errors with mkdir 2021-11-18 18:40:30 +03:00
Meradoch
ccc3fc2707 Fix permission denied error 2021-11-18 14:58:25 +03:00
Revant Nandgaonkar
b7d990b2a5 Merge pull request #566 from revant/gha-creds
ci: use git command to config git creds
2021-11-11 09:20:53 +05:30
Revant Nandgaonkar
d320db2d04 ci: use git command to config git creds 2021-11-11 06:30:33 +05:30
Revant Nandgaonkar
02d8ce6d21 Merge pull request #564 from revant/gha-creds
ci: fix steps for helm release
2021-11-11 05:21:45 +05:30
Revant Nandgaonkar
cbf646b326 ci: fix steps for helm release 2021-11-11 05:06:57 +05:30
Revant Nandgaonkar
a355d8a48f Merge pull request #563 from revant/gha-creds
ci: change git creds action for helm release
2021-11-11 04:20:49 +05:30
Revant Nandgaonkar
6a8440be34 ci: change git creds action for helm release 2021-11-10 22:10:51 +05:30
Revant Nandgaonkar
c0a4079cdf ci: fix git creds for helm release (#561) 2021-11-10 21:42:19 +05:30
Lev
2c97ffd579 fix: ERPNext build (#558)
* fix(erpnext-nginx): Install recommended apt packages, set DEBIAN_FRONTEND=noninteractive

* Revert "fix(erpnext-nginx): Install recommended apt packages, set DEBIAN_FRONTEND=noninteractive"

This reverts commit 652481175d.

* fix(erpnext-worker): Install gcc
2021-11-10 11:24:47 +03:00
Lev
7c157aa487 refactor: Dockerfiles (#555)
* refactor(frappe-worker): Dockerfile

* fix(frappe-worker): Cloning frappe repo

* refactor(frappe-nginx): Dockerfile

* refactor(erpnext-nginx): Dockerfile

* chore(frappe-worker): Add space in Dockerfile

* refactor(bench): Dockerfile

* refactor(frappe-socketio): Dockerfile

* ci(Test): Add `workflow_dispatch` trigger

* fix(bench): Uncomment missing package

* fix(bench): Replace legacy `libmariadbclient-dev` with `libmariadb-dev`

* refactor(erpnext-nginx): Install script

- Remove repetitive code
- Don't explicitly install production deps (they are installed via plain `yarn` with dev deps)
- Don't write to lockfiles

* fix(erpnext-nginx): use -e flag, fix installation

* fix(erpnext-nginx): Don't install unused wget

* fix(frappe-nginx): Get newest certificates

* fix: Install ca-certificates on erpnext-nginx instead of frappe-nginx

* trigger ci

* ci(test): Fix trigger duplicate

* chore: Fix linting
2021-11-10 04:43:46 +05:30
Revant Nandgaonkar
f0997dbf23 Merge pull request #556 from vrslev/fix-drop-flags
fix(frappe-worker): Drop flags
2021-11-09 22:20:20 +05:30
Lev
5a38d66a70 chore: Fix linting 2021-11-09 16:54:02 +03:00
Lev
a2db23e68e fix(frappe-worker): Drop flags 2021-11-09 16:49:40 +03:00
Lev
5254e2aad3 fix: Improve CI, fix builds (#554)
* ci(Test): Add `workflow_dispatch` trigger

* ci(Test): Build and run on push and pr

* test: Set failfast, remove ERPNext reference

* test: Reveal .env file for logs

* ci(Test): Rename step

* ci(Test): Fix git tag

* test: Add -x flag for debugging

* test: Fix failing test

* ci(Test): Check if built images are used

* ci(Test): Configure trigger paths, don't build on schedule

* test: Remove bug

* ci: Build and test stable images on PR

* fix(frappe-nginx): Get back to `ls` from `find`

* check if test passes with erpnext images

* fix(frappe-worker): Default sites in backup command

* get integration test changes back

* chore: Fix linting
2021-11-09 15:15:33 +03:00
Lev
b57371edf3 chore: Add version constraint for lint action 2021-11-09 14:52:44 +03:00
Lev
fe47a4b165 ci: Fix docker dependabot config 2021-11-09 14:29:06 +03:00
Lev
f74f730b5e chore: Fix lint issues (#553)
* ci(Lint): Temporarily disable branch contraint

* chore(erpnext-nginx): Fix linting

* chore: Fix linting issues

* ci(Lint): Add -x flag

* ci(Lint): Fix push trigger

* chore: Fix linting and formatting

* fix: Gunicorn server start

* chore(frappe-worker): Fix linting

* chore(frappe-nginx): Fix linting

* fix(erpnext-nginx): App installation

* fix(erpnext-nginx): App installation

* refactor(frappe-nginx): Use `find` instead of `ls`
2021-11-09 13:05:29 +03:00
Revant Nandgaonkar
358293afc9 Merge pull request #549 from vrslev/refactor-worker-commands
refactor(frappe-worker): Replace basic commands with bench
2021-11-09 04:12:58 +05:30
Lev
d1ed880c78 ci(Dependabot): Add config for docker and npm 2021-11-08 19:44:10 +03:00
Revant Nandgaonkar
5aa6e4ec4a Merge pull request #548 from vrslev/fix-socketio-cmd
fix(frappe-socketio): Remove dead `doctor` command
2021-11-08 21:21:18 +05:30
Lev
e4df6e5aec refactor(worker): Replace basic commands with bench 2021-11-08 16:10:26 +03:00
Lev
457ecc513b fix(frappe-socketio): Remove dead doctor command 2021-11-08 14:51:21 +03:00
Lev
9d41a6d24e Fix Python version for v12 2021-11-06 21:26:15 +03:00
Lev
de04eb032c build: Fix develop build 2021-11-06 21:11:29 +03:00
Lev
089a2dc206 build: Fix stable builds (#546) 2021-11-06 21:07:39 +03:00
Lev
daa1926f03 Revert "update"
This reverts commit ce1ed546ab.
2021-11-06 20:02:42 +03:00
Lev
ce1ed546ab update 2021-11-06 20:01:55 +03:00
Revant Nandgaonkar
8ad84719ea Merge pull request #544 from vrslev/improve-tests-and-fix-builds
Fix builds and tests
2021-11-06 17:10:33 +05:30
Revant Nandgaonkar
a8ab724212 Merge pull request #545 from vrslev/build-structure
chore: Move files from build/common
2021-11-06 11:22:47 +05:30
Lev
c808ad1767 chore: Move files from build/common 2021-11-05 20:00:11 +03:00
Lev
9a4aa8d226 ci: Lint on PR 2021-11-05 19:36:47 +03:00
Lev
9fa3e1b0e0 Merge branch 'main' into improve-tests-and-fix-builds 2021-11-05 19:01:18 +03:00
Lev
d2b18a3b48 update 2021-11-05 18:58:02 +03:00
Lev
38c7f1e269 Merge pull request #543 from vrslev/fix-build
ci: Fix stable build
2021-11-04 19:02:28 +03:00
Lev
de255d8052 ci: Fix stable build 2021-11-04 19:00:16 +03:00
Revant Nandgaonkar
915885bb05 Merge pull request #542 from vrslev/push-images-instantly
ci: Push images right after build
2021-11-04 21:27:45 +05:30
Lev
3c0f08652e ci: Push images right after build
This fixes the bug when ERPNext images are built upon old Frappe images and test are ran on old images
2021-11-04 15:24:08 +03:00
Revant Nandgaonkar
e685dc5ebc Merge pull request #540 from vrslev/update-base-images
build: Update base images
2021-11-04 14:02:28 +05:30
Lev
a4c115f96d build: Update Python from 3.7 to 3.9; Debian from 10 to 11 2021-11-03 16:48:01 +03:00
Revant Nandgaonkar
33ec8cafc3 Merge pull request #537 from dtwm/develop
fix: Add missing packages for frappe:develop
2021-11-01 20:49:07 +05:30
dt
63da01c702 fix: Add missing packages for frappe:develop 2021-11-01 10:49:45 +03:00
Lev
2da9c02d58 ci: Build fixes
- Simplify builds by separating dev/stable workflows
- Fix Helm deploy key
- Remove deploy_key.env (already using deploy key in secrets)
- Fix paths matching on push and pull_request triggers
- Fix possible issues with tag difference between ERPNext and Frappe (add tag resolving step before pushing)
- Don't login, push Docker images and release Helm chart on forks
- Don't test on version 12 (there's no test for this version)
- Remove frappe-installer (from chore: use github actions #525)
- Fix badges in readme
2021-10-31 11:02:58 +05:30
Revant Nandgaonkar
37b8ccece1 Merge pull request #528 from frappe/dependabot/github_actions/actions/stale-4
chore(deps): bump actions/stale from 1 to 4
2021-10-30 18:28:17 +05:30
Revant Nandgaonkar
08a542978f Merge pull request #533 from revant/ci-fix-workflows
ci: fixes ci steps
2021-10-30 16:26:07 +05:30
Revant Nandgaonkar
7d36be56f4 ci: fixes ci steps
helm release deploy key uses webfactory/ssh-agent@v0.5.3
test only on PR
docker login only if not PR
2021-10-30 11:47:12 +05:30
Revant Nandgaonkar
4c79d6d7c6 Merge pull request #531 from revant/fix-b64decode
ci: fix base64 decode of env variable
2021-10-29 22:48:56 +05:30
Revant Nandgaonkar
107f393277 ci: fix base64 decode of env variable 2021-10-29 22:44:30 +05:30
Revant Nandgaonkar
47b2d34dd1 Merge pull request #530 from vrslev/fix-typo-in-gha-workflow
ci(Build): Fix paths for PRs and branches
2021-10-29 16:49:23 +05:30
Lev
1daec15268 ci(Build): Fix paths for PRs and branches 2021-10-29 13:44:25 +03:00
dependabot[bot]
7518c2d374 chore(deps): bump actions/stale from 1 to 4
Bumps [actions/stale](https://github.com/actions/stale) from 1 to 4.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v1...v4)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-29 06:04:50 +00:00
Revant Nandgaonkar
20a119d7aa Merge pull request #527 from vrslev/develop
ci: Use Docker Buildx Bake and GitHub Actions
2021-10-29 11:34:32 +05:30
Lev
b18119574b ci: Use base64 encoded helm deploy key 2021-10-28 10:39:24 +03:00
Lev
a3cf159439 ci: Uncomment for-production code 2021-10-27 16:27:46 +03:00
Lev
078a7f5602 chore: Rename badge 2021-10-27 16:10:14 +03:00
Lev
1cbb845af1 ci: Use GitHub Actions to build images 2021-10-27 16:07:43 +03:00
Revant Nandgaonkar
c149a93f31 Merge pull request #517 from revant/dev-docs
dev updates
2021-09-15 15:12:37 +05:30
Revant Nandgaonkar
90e973090e chore: devcontainer update
specify shell for devcontainer

[skip travis]
2021-09-15 15:11:36 +05:30
Revant Nandgaonkar
401613900f docs: update dev README for v13 2021-09-15 15:10:19 +05:30
Revant Nandgaonkar
9d3e66528d Merge pull request #509 from PeterDaveHello/clean-up-apt-cache-in-dockerfile
Make sure apt lists cleaned up in Dockerfile
2021-08-11 06:32:27 +05:30
Revant Nandgaonkar
48e9947580 fix: empty continuation line 2021-08-10 21:33:08 +05:30
Peter Dave Hello
428b8abffe Make sure apt lists cleaned up in Dockerfile 2021-08-10 19:16:46 +08:00
Revant Nandgaonkar
7fc0f06610 Merge pull request #508 from PeterDaveHello/patch-1
Set git clone depth to 1 in build/bench/Dockerfile
2021-08-09 21:09:01 +05:30
Peter Dave Hello
08442253c8 Set git clone depth to 1 in build/bench/Dockerfile
Looks like it's done in the other Dockerfiles
2021-08-09 16:13:05 +08:00
Revant Nandgaonkar
911c4ca6ce Merge pull request #499 from iboen/patch-1
fix: rename volume for creating job
2021-07-11 19:46:49 +05:30
Ibnu Sina Wardy
f5d9832ae1 fix: rename volume for creating job 2021-07-10 20:51:49 +07:00
154 changed files with 5576 additions and 5631 deletions

View File

@@ -1,7 +1,4 @@
# frappe_docker .dockerignore file
.travis.yml
README.md
LICENSE.md
LICENSE
.gitignore
docker-*.yml
compose*.yaml

19
.editorconfig Normal file
View File

@@ -0,0 +1,19 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
[*.{py, pyi}]
indent_size = 4
[*Dockerfile*]
indent_size = 4
[*.md]
trim_trailing_whitespace = false

26
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
- package-ecosystem: docker
directory: images/bench
schedule:
interval: daily
- package-ecosystem: docker
directory: images/production
schedule:
interval: daily
- package-ecosystem: docker
directory: images/custom
schedule:
interval: daily
- package-ecosystem: pip
directory: /
schedule:
interval: daily

78
.github/scripts/get_latest_tags.py vendored Normal file
View File

@@ -0,0 +1,78 @@
from __future__ import annotations
import argparse
import json
import os
import re
import subprocess
import sys
from typing import Literal
Repo = Literal["frappe", "erpnext"]
MajorVersion = Literal["12", "13", "14", "15", "develop"]
def get_latest_tag(repo: Repo, version: MajorVersion) -> str:
if version == "develop":
return "develop"
regex = rf"v{version}.*"
refs = subprocess.check_output(
(
"git",
"-c",
"versionsort.suffix=-",
"ls-remote",
"--refs",
"--tags",
"--sort=v:refname",
f"https://github.com/frappe/{repo}",
str(regex),
),
encoding="UTF-8",
).split()[1::2]
if not refs:
raise RuntimeError(f'No tags found for version "{regex}"')
ref = refs[-1]
matches: list[str] = re.findall(regex, ref)
if not matches:
raise RuntimeError(f'Can\'t parse tag from ref "{ref}"')
return matches[0]
def update_env(file_name: str, frappe_tag: str, erpnext_tag: str | None = None):
text = f"\nFRAPPE_VERSION={frappe_tag}"
if erpnext_tag:
text += f"\nERPNEXT_VERSION={erpnext_tag}"
with open(file_name, "a") as f:
f.write(text)
def _print_resp(frappe_tag: str, erpnext_tag: str | None = None):
print(json.dumps({"frappe": frappe_tag, "erpnext": erpnext_tag}))
def main(_args: list[str]) -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--repo", choices=["frappe", "erpnext"], required=True)
parser.add_argument(
"--version", choices=["12", "13", "14", "15", "develop"], required=True
)
args = parser.parse_args(_args)
frappe_tag = get_latest_tag("frappe", args.version)
if args.repo == "erpnext":
erpnext_tag = get_latest_tag("erpnext", args.version)
else:
erpnext_tag = None
file_name = os.getenv("GITHUB_ENV")
if file_name:
update_env(file_name, frappe_tag, erpnext_tag)
_print_resp(frappe_tag, erpnext_tag)
return 0
if __name__ == "__main__":
raise SystemExit(main(sys.argv[1:]))

28
.github/scripts/update_example_env.py vendored Normal file
View File

@@ -0,0 +1,28 @@
import os
import re
def get_erpnext_version():
erpnext_version = os.getenv("ERPNEXT_VERSION")
assert erpnext_version, "No ERPNext version set"
return erpnext_version
def update_env(erpnext_version: str):
with open("example.env", "r+") as f:
content = f.read()
content = re.sub(
rf"ERPNEXT_VERSION=.*", f"ERPNEXT_VERSION={erpnext_version}", content
)
f.seek(0)
f.truncate()
f.write(content)
def main() -> int:
update_env(get_erpnext_version())
return 0
if __name__ == "__main__":
raise SystemExit(main())

30
.github/scripts/update_pwd.py vendored Normal file
View File

@@ -0,0 +1,30 @@
import os
import re
def get_versions():
frappe_version = os.getenv("FRAPPE_VERSION")
erpnext_version = os.getenv("ERPNEXT_VERSION")
assert frappe_version, "No Frappe version set"
assert erpnext_version, "No ERPNext version set"
return frappe_version, erpnext_version
def update_pwd(frappe_version: str, erpnext_version: str):
with open("pwd.yml", "r+") as f:
content = f.read()
content = re.sub(
rf"frappe/erpnext:.*", f"frappe/erpnext:{erpnext_version}", content
)
f.seek(0)
f.truncate()
f.write(content)
def main() -> int:
update_pwd(*get_versions())
return 0
if __name__ == "__main__":
raise SystemExit(main())

59
.github/workflows/build_bench.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: Bench
on:
pull_request:
branches:
- main
paths:
- images/bench/**
- docker-bake.hcl
- .github/workflows/build_bench.yml
schedule:
# Every day at 12:00 pm
- cron: 0 0 * * *
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
- name: Set Environment Variables
run: cat example.env | grep -o '^[^#]*' >> "$GITHUB_ENV"
- name: Get Bench Latest Version
run: echo "LATEST_BENCH_RELEASE=$(curl -s 'https://api.github.com/repos/frappe/bench/releases/latest' | jq -r '.tag_name')" >> "$GITHUB_ENV"
- name: Build and test
uses: docker/bake-action@v6.9.0
with:
source: .
targets: bench-test
- name: Login
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
uses: docker/bake-action@v6.9.0
with:
targets: bench
push: true
set: "*.platform=linux/amd64,linux/arm64"

33
.github/workflows/build_develop.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Develop build
on:
pull_request:
branches:
- main
paths:
- images/production/**
- overrides/**
- tests/**
- compose.yaml
- docker-bake.hcl
- example.env
- .github/workflows/build_develop.yml
schedule:
# Every day at 12:00 pm
- cron: 0 0 * * *
workflow_dispatch:
jobs:
build:
uses: ./.github/workflows/docker-build-push.yml
with:
repo: erpnext
version: develop
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
python_version: 3.11.6
node_version: 20.19.2
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

116
.github/workflows/build_stable.yml vendored Normal file
View File

@@ -0,0 +1,116 @@
name: Stable build
on:
pull_request:
branches:
- main
paths:
- images/production/**
- overrides/**
- tests/**
- compose.yaml
- docker-bake.hcl
- example.env
- .github/workflows/build_stable.yml
push:
branches:
- main
paths:
- images/production/**
- overrides/**
- tests/**
- compose.yaml
- docker-bake.hcl
- example.env
# Triggered from frappe/frappe and frappe/erpnext on releases
repository_dispatch:
workflow_dispatch:
jobs:
v14:
uses: ./.github/workflows/docker-build-push.yml
with:
repo: erpnext
version: "14"
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
python_version: 3.10.13
node_version: 16.20.2
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
v15:
uses: ./.github/workflows/docker-build-push.yml
with:
repo: erpnext
version: "15"
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
python_version: 3.11.6
node_version: 20.19.2
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
update_versions:
name: Update example.env and pwd.yml
runs-on: ubuntu-latest
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
needs: v15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Get latest versions
run: python3 ./.github/scripts/get_latest_tags.py --repo erpnext --version 15
- name: Update
run: |
python3 ./.github/scripts/update_example_env.py
python3 ./.github/scripts/update_pwd.py
- name: Push
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
git add example.env pwd.yml
if [ -z "$(git status --porcelain)" ]; then
echo "versions did not change, exiting."
exit 0
else
echo "version changed, pushing changes..."
git commit -m "chore: Update example.env"
git pull --rebase
git push origin main
fi
release_helm:
name: Release Helm
runs-on: ubuntu-latest
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
needs: v15
steps:
- name: Setup deploy key
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.HELM_DEPLOY_KEY }}
- name: Setup Git Credentials
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Release
run: |
git clone git@github.com:frappe/helm.git && cd helm
pip install -r release_wizard/requirements.txt
./release_wizard/wizard 15 patch --remote origin --ci

101
.github/workflows/docker-build-push.yml vendored Normal file
View File

@@ -0,0 +1,101 @@
name: Build
on:
workflow_call:
inputs:
repo:
required: true
type: string
description: "'erpnext' or 'frappe'"
version:
required: true
type: string
description: "Major version, git tags should match 'v{version}.*'; or 'develop'"
push:
required: true
type: boolean
python_version:
required: true
type: string
description: Python Version
node_version:
required: true
type: string
description: NodeJS Version
secrets:
DOCKERHUB_USERNAME:
required: true
DOCKERHUB_TOKEN:
required: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
services:
registry:
image: docker.io/registry:2
ports:
- 5000:5000
strategy:
matrix:
arch: [amd64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
platforms: linux/${{ matrix.arch }}
- name: Get latest versions
run: python3 ./.github/scripts/get_latest_tags.py --repo ${{ inputs.repo }} --version ${{ inputs.version }}
- name: Set build args
run: |
echo "PYTHON_VERSION=${{ inputs.python_version }}" >> "$GITHUB_ENV"
echo "NODE_VERSION=${{ inputs.node_version }}" >> "$GITHUB_ENV"
- name: Build
uses: docker/bake-action@v6.9.0
with:
source: .
push: true
env:
REGISTRY_USER: localhost:5000/frappe
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m venv venv
venv/bin/pip install -r requirements-test.txt
- name: Test
run: venv/bin/pytest --color=yes
- name: Login
if: ${{ inputs.push }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push
if: ${{ inputs.push }}
uses: docker/bake-action@v6.9.0
with:
push: true
set: "*.platform=linux/amd64,linux/arm64"

35
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.10.6"
# For shfmt pre-commit hook
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: "^1.14"
- name: Install pre-commit
run: pip install -U pre-commit
- name: Lint
run: pre-commit run --color=always --all-files
env:
GO111MODULE: on

View File

@@ -0,0 +1,26 @@
name: Autoupdate pre-commit hooks
on:
schedule:
# Every day at 7 am
- cron: 0 7 * * *
jobs:
pre-commit-autoupdate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Update pre-commit hooks
uses: vrslev/pre-commit-autoupdate@v1.0.0
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
branch: pre-commit-autoupdate
title: "chore(deps): Update pre-commit hooks"
commit-message: "chore(deps): Update pre-commit hooks"
body: Update pre-commit hooks
labels: dependencies,development
delete-branch: True

View File

@@ -2,18 +2,17 @@ name: Mark stale issues and pull requests
on:
schedule:
- cron: "0 0 * * *"
# Every day at 12:00 pm
- cron: 0 0 * * *
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been automatically marked as stale. You have a week to explain why you believe this is an error.'
stale-pr-message: 'This PR has been automatically marked as stale. You have a week to explain why you believe this is an error.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
- uses: actions/stale@v10
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: This issue has been automatically marked as stale. You have a week to explain why you believe this is an error.
stale-pr-message: This PR has been automatically marked as stale. You have a week to explain why you believe this is an error.
stale-issue-label: no-issue-activity
stale-pr-label: no-pr-activity

22
.gitignore vendored
View File

@@ -1,18 +1,30 @@
*.code-workspace
# Environment Variables
.env
# mounted volume
sites
development
development/*
!development/README.md
deploy_key
deploy_key.pub
!development/installer.py
!development/apps-example.json
!development/vscode-example/
# Pycharm
.idea
# VS Code
.vscode/**
!.vscode/extensions.json
# VS Code devcontainer
.devcontainer
*.code-workspace
# Python
*.pyc
__pycache__
venv
# NodeJS
node_modules

55
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,55 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies:
- prettier@3.5.2
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args:
- -L
- "ro"
- repo: local
hooks:
- id: shfmt
name: shfmt
language: golang
additional_dependencies: [mvdan.cc/sh/v3/cmd/shfmt@latest]
entry: shfmt
args: [-w]
types: [shell]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: [-x]

1
.shellcheckrc Normal file
View File

@@ -0,0 +1 @@
external-sources=true

View File

@@ -1,187 +0,0 @@
sudo: required
dist: bionic
language: python
python:
- '3.6'
services:
- docker
before_install:
- if [[ "$BUILD" != "development" ]]; then
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
sudo apt-get update && sudo apt-get -y install git;
fi
- if [[ $BUILD == "development" ]];then
sudo apt-get update && sudo apt-get -y install docker-compose;
fi
- chmod u+x ./travis.py
after_success:
- docker --version
jobs:
include:
- stage: "Build Frappe bench development environment (latest)"
if: branch = develop AND type != pull_request
script:
- docker build -t frappe/bench:latest -f build/bench/Dockerfile .
- docker push frappe/bench:latest
- stage: "Frappe (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py frappe --worker --tag latest
- ./travis.py frappe --worker --tag edge --tag-only
- ./travis.py frappe --worker --tag develop --tag-only
- stage: "Frappe (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py frappe --nginx --tag latest
- ./travis.py frappe --nginx --tag edge --tag-only
- ./travis.py frappe --nginx --tag develop --tag-only
- stage: "Frappe (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py frappe --socketio --tag latest
- ./travis.py frappe --socketio --tag edge --tag-only
- ./travis.py frappe --socketio --tag develop --tag-only
- stage: "ERPNext (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py erpnext --worker --tag latest
- ./travis.py erpnext --worker --tag edge --tag-only
- ./travis.py erpnext --worker --tag develop --tag-only
- stage: "ERPNext (edge)"
if: branch = develop AND type != pull_request
script:
- ./travis.py erpnext --nginx --tag latest
- ./travis.py erpnext --nginx --tag edge --tag-only
- ./travis.py erpnext --nginx --tag develop --tag-only
- stage: "Frappe (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --worker --git-version 13
- ./travis.py frappe --worker --tag v13 --tag-only
- ./travis.py frappe --worker --tag version-13 --tag-only
- stage: "Frappe (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --nginx --git-version 13
- ./travis.py frappe --nginx --tag v13 --tag-only
- ./travis.py frappe --nginx --tag version-13 --tag-only
- stage: "Frappe (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 13
- ./travis.py frappe --socketio --tag v13 --tag-only
- ./travis.py frappe --socketio --tag version-13 --tag-only
- stage: "ERPNext (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --worker --git-version 13
- ./travis.py erpnext --worker --tag v13 --tag-only
- ./travis.py erpnext --worker --tag version-13 --tag-only
- stage: "ERPNext (v13)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --nginx --git-version 13
- ./travis.py erpnext --nginx --tag v13 --tag-only
- ./travis.py erpnext --nginx --tag version-13 --tag-only
- stage: "Frappe (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --worker --git-version 12
- ./travis.py frappe --worker --tag v12 --tag-only
- ./travis.py frappe --worker --tag version-12 --tag-only
- stage: "Frappe (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --nginx --git-version 12
- ./travis.py frappe --nginx --tag v12 --tag-only
- ./travis.py frappe --nginx --tag version-12 --tag-only
- stage: "Frappe (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 12
- ./travis.py frappe --socketio --tag v12 --tag-only
- ./travis.py frappe --socketio --tag version-12 --tag-only
- stage: "ERPNext (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --worker --git-version 12
- ./travis.py erpnext --worker --tag v12 --tag-only
- ./travis.py erpnext --worker --tag version-12 --tag-only
- stage: "ERPNext (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --nginx --git-version 12
- ./travis.py erpnext --nginx --tag v12 --tag-only
- ./travis.py erpnext --nginx --tag version-12 --tag-only
- stage: "Frappe (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --worker --git-version 11
- ./travis.py frappe --worker --tag v11 --tag-only
- ./travis.py frappe --worker --tag version-11 --tag-only
- stage: "Frappe (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --nginx --git-version 11
- ./travis.py frappe --nginx --tag v11 --tag-only
- ./travis.py frappe --nginx --tag version-11 --tag-only
- stage: "Frappe (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 11
- ./travis.py frappe --socketio --tag v11 --tag-only
- ./travis.py frappe --socketio --tag version-11 --tag-only
- stage: "ERPNext (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --worker --git-version 11
- ./travis.py erpnext --worker --tag v11 --tag-only
- ./travis.py erpnext --worker --tag version-11 --tag-only
- stage: "ERPNext (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --nginx --git-version 11
- ./travis.py erpnext --nginx --tag v11 --tag-only
- ./travis.py erpnext --nginx --tag version-11 --tag-only
- stage: "Build and test edge images"
if: type = pull_request
before_install:
- sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- sudo apt-get update && sudo apt-get -y install w3m shellcheck
script:
- ./tests/check-format.sh
- docker build -t frappe/frappe-socketio:edge -f build/frappe-socketio/Dockerfile .
- docker build -t frappe/frappe-worker:develop -f build/frappe-worker/Dockerfile .
- docker build -t frappe/erpnext-worker:edge -f build/erpnext-worker/Dockerfile .
- docker build -t frappe/frappe-nginx:develop -f build/frappe-nginx/Dockerfile .
- docker build -t frappe/erpnext-nginx:edge -f build/erpnext-nginx/Dockerfile .
- ./tests/docker-test.sh
- stage: "Pull and test edge images"
if: branch = develop AND type != pull_request
before_install:
- sudo apt-get update && sudo apt-get -y install docker-compose w3m
script:
- ./tests/docker-test.sh
- stage: "Helm Chart Release"
if: branch = master AND type != pull_request
env:
- GIT_SSH_COMMAND="ssh -i ${TRAVIS_BUILD_DIR}/deploy_key"
before_install:
- openssl aes-256-cbc -K $encrypted_189e52c2c347_key -iv $encrypted_189e52c2c347_iv -in deploy_key.enc -out deploy_key -d;
chmod 400 deploy_key;
- ssh-keyscan github.com >> $HOME/.ssh/known_hosts 2>/dev/null;
install:
- pip install --upgrade pip
script:
- git clone git@github.com:frappe/helm.git && cd helm
- pip install -r release_wizard/requirements.txt
- ./release_wizard/wizard 13 patch --remote origin --ci

View File

@@ -1,13 +1,9 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-vscode-remote.remote-containers"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [
]
// List of extensions which should be recommended for users of this workspace.
"recommendations": ["ms-vscode-remote.remote-containers"],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}

View File

@@ -6,7 +6,7 @@ In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
level of experience, education, socioeconomic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities

View File

@@ -1,68 +1,81 @@
# Contribution Guidelines
## Branches
Before publishing a PR, please test builds locally.
* *master*: images on the master branch are built monthly and with github action triggered by ERPNext release.
* *develop*: images on this branch are built daily and when PR is merged into develop.
On each PR that contains changes relevant to Docker builds, images are being built and tested in our CI (GitHub Actions).
# Pull Requests
> :evergreen_tree: Please be considerate when pushing commits and opening PR for multiple branches, as the process of building images uses energy and contributes to global warming.
Please **send all pull request exclusively to the *develop*** branch.
When the PR are merged, the merge will trigger the image build automatically.
## Lint
Please test all PR as extensively as you can, considering that the software can be run in different modes:
We use `pre-commit` framework to lint the codebase before committing.
First, you need to install pre-commit with pip:
* with docker-compose for production
* with or without Nginx proxy
* with VScode for testing environments
```shell
pip install pre-commit
```
Every once in a while (or with monthly release) develop will be merged into master.
Also you can use brew if you're on Mac:
There is Github Action is configured on ERPNext repository. Whenever there is a ERPNext release it will trigger a build on master branch of frappe_docker repo to generate images for released version.
```shell
brew install pre-commit
```
When a PR is sent, the images are built and all commands are tested.
To setup _pre-commit_ hook, run:
If update or fixes to documentation are pushed use `[skip travis]` anywhere in commit message to skip travis.
```shell
pre-commit install
```
## Reducing the number of branching and builds :evergreen_tree: :evergreen_tree: :evergreen_tree:
To run all the files in repository, run:
Please be considerate when pushing commits and opening PR for multiple branches, as the process of building images (triggered on push and PR branch push) uses energy and contributes to global warming.
```shell
pre-commit run --all-files
```
## Build
We use [Docker Buildx Bake](https://docs.docker.com/engine/reference/commandline/buildx_bake/). To build the images, run command below:
```shell
FRAPPE_VERSION=... ERPNEXT_VERSION=... docker buildx bake <targets>
```
Available targets can be found in `docker-bake.hcl`.
## Test
We use [pytest](https://pytest.org) for our integration tests.
Install Python test requirements:
```shell
python3 -m venv venv
source venv/bin/activate
pip install -r requirements-test.txt
```
Run pytest:
```shell
pytest
```
# Documentation
Place relevant markdown file(s) in the `docs` directory and index them in README.md located at the root of repo.
Place relevant markdown files in the `docs` directory and index them in README.md located at the root of repo.
# Wiki
# Frappe and ERPNext updates
Add alternatives that can be used optionally along with frappe_docker. Add articles to list on home page as well.
Each Frappe/ERPNext release triggers new stable images builds as well as bump to helm chart.
# Prerequisites to pass CI
# Maintenance
### Check shell script format
In case of new release of Debian. e.g. bullseye to bookworm. Change following files:
Use the following script
- `images/erpnext/Containerfile` and `images/custom/Containerfile`: Change the files to use new debian release, make sure new python version tag that is available on new debian release image. e.g. 3.9.9 (bullseye) to 3.9.17 (bookworm) or 3.10.5 (bullseye) to 3.10.12 (bookworm). Make sure apt-get packages and wkhtmltopdf version are also upgraded accordingly.
- `images/bench/Dockerfile`: Change the files to use new debian release. Make sure apt-get packages and wkhtmltopdf version are also upgraded accordingly.
```shell
./tests/check-format.sh
```
Change following files on release of ERPNext
### Build images locally
Use the following commands
```shell
docker build -t frappe/frappe-socketio:edge -f build/frappe-socketio/Dockerfile .
docker build -t frappe/frappe-worker:develop -f build/frappe-worker/Dockerfile .
docker build -t frappe/erpnext-worker:edge -f build/erpnext-worker/Dockerfile .
docker build -t frappe/frappe-nginx:develop -f build/frappe-nginx/Dockerfile .
docker build -t frappe/erpnext-nginx:edge -f build/erpnext-nginx/Dockerfile .
```
### Test running docker containers
Use the following script
```shell
./tests/docker-test.sh
```
- `.github/workflows/build_stable.yml`: Add the new release step under `jobs` and remove the unmaintained one. e.g. In case v12, v13 available, v14 will be added and v12 will be removed on release of v14. Also change the `needs:` for later steps to `v14` from `v13`.

View File

111
README.md
View File

@@ -1,70 +1,89 @@
| Develop | [![Build Status](https://travis-ci.com/frappe/frappe_docker.svg?branch=develop)](https://travis-ci.com/frappe/frappe_docker) |
|---------|-----------------------------------------------------------------------------------------------------------------------------|
| Master | [![Build Status](https://travis-ci.com/frappe/frappe_docker.svg?branch=master)](https://travis-ci.com/frappe/frappe_docker) |
[![Build Stable](https://github.com/frappe/frappe_docker/actions/workflows/build_stable.yml/badge.svg)](https://github.com/frappe/frappe_docker/actions/workflows/build_stable.yml)
[![Build Develop](https://github.com/frappe/frappe_docker/actions/workflows/build_develop.yml/badge.svg)](https://github.com/frappe/frappe_docker/actions/workflows/build_develop.yml)
## Getting Started
Everything about [Frappe](https://github.com/frappe/frappe) and [ERPNext](https://github.com/frappe/erpnext) in containers.
# Getting Started
To get started you need [Docker](https://docs.docker.com/get-docker/), [docker-compose](https://docs.docker.com/compose/), and [git](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git) setup on your machine. For Docker basics and best practices refer to Docker's [documentation](http://docs.docker.com).
Once completed, chose one of the following two sections for next steps.
### Try in Play With Docker
<a href="https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/frappe/frappe_docker/develop/tests/pwd.yml">
To play in an already set up sandbox, in your browser, click the button below:
<a href="https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/frappe/frappe_docker/main/pwd.yml">
<img src="https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png" alt="Try in PWD"/>
</a>
Wait for 5 minutes for ERPNext site to be created or check `site-creator` container logs before opening browser on port 80. (username: `Administrator`, password: `admin`)
### Try on your Dev environment
### Setting up Pre-requisites
This repository requires Docker, docker-compose and Git to be setup on the instance to be used.
For Docker basics and best practices. Refer Docker [documentation](http://docs.docker.com).
### Cloning the repository and preliminary steps
Clone this repository somewhere in your system:
First clone the repo:
```sh
git clone https://github.com/frappe/frappe_docker.git
git clone https://github.com/frappe/frappe_docker
cd frappe_docker
```
## Production Setup
Then run: `docker compose -f pwd.yml up -d`
It takes care of the following:
### To run on ARM64 architecture follow this instructions
* Setting up the desired version of Frappe/ERPNext.
* Setting up all the system requirements: eg. MariaDB, Node, Redis.
* Configure networking for remote access and setting up LetsEncrypt.
After you clone the repo and `cd frappe_docker`, run this command to build multi-architecture images specifically for ARM64.
It doesn't take care of the following:
`docker buildx bake --no-cache --set "*.platform=linux/arm64"`
* Cron Job to backup sites is not created by default.
* Use `CronJob` on k8s or refer wiki for alternatives.
and then
1. Single Server Installs
1. [Single bench](docs/single-bench.md). Easiest Install!
2. [Multi bench](docs/multi-bench.md)
2. Multi Server Installs
1. [Docker Swarm](docs/docker-swarm.md)
2. [Kubernetes](https://helm.erpnext.com)
3. [Site Operations](docs/site-operations.md)
4. [Environment Variables](docs/environment-variables.md)
5. [Custom apps for production](docs/custom-apps-for-production.md)
6. [Tips for moving deployments](docs/tips-for-moving-deployments.md)
7. [Wiki for optional recipes](https://github.com/frappe/frappe_docker/wiki)
- add `platform: linux/arm64` to all services in the `pwd.yml`
- replace the current specified versions of erpnext image on `pwd.yml` with `:latest`
## Development Setup
Then run: `docker compose -f pwd.yml up -d`
It takes care of complete setup to develop with Frappe/ERPNext and Bench, Including the following features:
## Final steps
- VSCode containers integration
- VSCode Python debugger
- Pre-configured Docker containers for an easy start
Wait for 5 minutes for ERPNext site to be created or check `create-site` container logs before opening browser on port 8080. (username: `Administrator`, password: `admin`)
[Start development](development).
If you ran in a Dev Docker environment, to view container logs: `docker compose -f pwd.yml logs -f create-site`. Don't worry about some of the initial error messages, some services take a while to become ready, and then they go away.
## Contributing
# Documentation
- [Frappe Docker Images](CONTRIBUTING.md)
- [Frappe Framework](https://github.com/frappe/frappe#contributing)
- [ERPNext](https://github.com/frappe/erpnext#contributing)
- [frappe/bench](https://github.com/frappe/bench)
### [Frequently Asked Questions](https://github.com/frappe/frappe_docker/wiki/Frequently-Asked-Questions)
### [Production](#production)
- [List of containers](docs/container-setup/01-overview.md)
- [Single Compose Setup](docs/single-compose-setup.md)
- [Environment Variables](docs/container-setup/env-variables.md)
- [Single Server Example](docs/single-server-example.md)
- [Setup Options](docs/setup-options.md)
- [Site Operations](docs/site-operations.md)
- [Backup and Push Cron Job](docs/backup-and-push-cronjob.md)
- [Port Based Multi Tenancy](docs/port-based-multi-tenancy.md)
- [Migrate from multi-image setup](docs/migrate-from-multi-image-setup.md)
- [running on linux/mac](docs/setup_for_linux_mac.md)
- [TLS for local deployment](docs/tls-for-local-deployment.md)
### [Custom Images](#custom-images)
- [Custom Apps](docs/container-setup/02-build-setup.md)
- [Build Version 10 Images](docs/build-version-10-images.md)
### [Development](#development)
- [Development using containers](docs/development.md)
- [Bench Console and VSCode Debugger](docs/bench-console-and-vscode-debugger.md)
- [Connect to localhost services](docs/connect-to-localhost-services-from-containers-for-local-app-development.md)
### [Troubleshoot](docs/troubleshoot.md)
# Contributing
If you want to contribute to this repo refer to [CONTRIBUTING.md](CONTRIBUTING.md)
This repository is only for container related stuff. You also might want to contribute to:
- [Frappe framework](https://github.com/frappe/frappe#contributing),
- [ERPNext](https://github.com/frappe/erpnext#contributing),
- [Frappe Bench](https://github.com/frappe/bench).

18
apps.json Normal file
View File

@@ -0,0 +1,18 @@
[
{
"url": "https://github.com/frappe/erpnext",
"branch": "version-15"
},
{
"url": "https://github.com/frappe/hrms",
"branch": "version-15"
},
{
"url": "https://github.com/frappe/helpdesk",
"branch": "main"
},
{
"url": "https://github.com/frappe/payments",
"branch": "version-15"
}
]

View File

@@ -1,122 +0,0 @@
# Frappe Bench Dockerfile
FROM debian:buster-slim
ARG GIT_REPO=https://github.com/frappe/bench.git
ARG GIT_BRANCH=develop
LABEL author=frappé
RUN apt-get update -y && apt-get install \
git \
wkhtmltopdf \
mariadb-client \
postgresql-client \
gettext-base \
wget \
# for PDF
libssl-dev \
fonts-cantarell \
xfonts-75dpi \
xfonts-base \
# to work inside the container
locales \
build-essential \
cron \
curl \
vim \
sudo \
iputils-ping \
watch \
tree \
nano \
software-properties-common \
bash-completion \
# For psycopg2
libpq-dev \
# Other
libffi-dev \
liblcms2-dev \
libldap2-dev \
libmariadbclient-dev \
libsasl2-dev \
libtiff5-dev \
libwebp-dev \
redis-tools \
rlwrap \
tk8.6-dev \
ssh-client \
# VSCode container requirements
net-tools \
# PYTHON
python3-dev \
python3-pip \
python3-setuptools \
python3-tk \
python-virtualenv \
less -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales
# Detect arch, download and install wkhtmltox
RUN if [ `uname -m` = 'aarch64' ]; then export ARCH=arm64; fi \
&& if [ `uname -m` = 'x86_64' ]; then export ARCH=amd64; fi \
&& wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_${ARCH}.deb \
&& dpkg -i wkhtmltox_0.12.6-1.buster_${ARCH}.deb && rm wkhtmltox_0.12.6-1.buster_${ARCH}.deb
# Create new user with home directory, improve docker compatibility with UID/GID 1000, add user to sudo group, allow passwordless sudo, switch to that user and change directory to user home directory
RUN groupadd -g 1000 frappe
RUN useradd --no-log-init -r -m -u 1000 -g 1000 -G sudo frappe
RUN echo "frappe ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER frappe
WORKDIR /home/frappe
# Clone and install bench in the local user home directory
# For development, bench source is located in ~/.bench
RUN git clone ${GIT_REPO} -b ${GIT_BRANCH} .bench \
&& pip3 install --user -e .bench
# Export python executables for Dockerfile
ENV PATH=/home/frappe/.local/bin:$PATH
# Export python executables for interactive shell
RUN echo "export PATH=/home/frappe/.local/bin:\$PATH" >> /home/frappe/.bashrc
# Print version and verify bashrc is properly sourced so that everything works in the Dockerfile
RUN bench --version
# Print version and verify bashrc is properly sourced so that everything works in the interactive shell
RUN bash -c "bench --version"
# !!! UPDATE NODEJS PERIODICALLY WITH LATEST VERSIONS !!!
# https://nodejs.org/en/about/releases/
# https://nodejs.org/download/release/latest-v10.x/
# https://nodejs.org/download/release/latest-v14.x/
ENV NODE_VERSION=14.17.0
ENV NODE_VERSION_FRAPPEV11=10.24.1
# Install nvm with node
RUN wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh
RUN chmod +x install.sh
RUN ./install.sh
ENV NVM_DIR=/home/frappe/.nvm
# Install node for Frappe V11, install yarn
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION_FRAPPEV11}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION_FRAPPEV11} && npm install -g yarn
# Install node for latest frappe, set as default, install node
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} && npm install -g yarn
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/home/frappe/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
# Print version and verify bashrc is properly sourced so that everything works in the Dockerfile
RUN node --version \
&& npm --version \
&& yarn --version
# Print version and verify bashrc is properly sourced so that everything works in the interactive shell
RUN bash -c "node --version" \
&& bash -c "npm --version" \
&& bash -c "yarn --version"
EXPOSE 8000-8005 9000-9005 6787

View File

@@ -1,64 +0,0 @@
import os
import semantic_version
import git
from migrate import migrate_sites
from utils import (
save_version_file,
get_apps,
get_container_versions,
get_version_file,
get_config
)
def main():
is_ready = False
apps = get_apps()
container_versions = get_container_versions(apps)
version_file = get_version_file()
if not version_file:
version_file = container_versions
save_version_file(version_file)
for app in apps:
container_version = None
file_version = None
version_file_hash = None
container_hash = None
repo = git.Repo(os.path.join('..', 'apps', app))
branch = repo.active_branch.name
if branch == 'develop':
version_file_hash = version_file.get(app+'_git_hash')
container_hash = container_versions.get(app+'_git_hash')
if container_hash and version_file_hash:
if container_hash != version_file_hash:
is_ready = True
break
if version_file.get(app):
file_version = semantic_version.Version(version_file.get(app))
if container_versions.get(app):
container_version = semantic_version.Version(container_versions.get(app))
if file_version and container_version:
if container_version > file_version:
is_ready = True
break
config = get_config()
if is_ready and config.get('maintenance_mode') != 1:
migrate_sites(maintenance_mode=True)
version_file = container_versions
save_version_file(version_file)
if __name__ == "__main__":
main()

View File

@@ -1,11 +0,0 @@
from frappe.utils.scheduler import start_scheduler
def main():
print("Starting background scheduler . . .")
start_scheduler()
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,39 +0,0 @@
import os
import frappe
from frappe.utils.backups import scheduled_backup
from frappe.utils import cint, get_sites, now
def backup(sites, with_files=False):
for site in sites:
frappe.init(site)
frappe.connect()
odb = scheduled_backup(
ignore_files=not with_files,
backup_path_db=None,
backup_path_files=None,
backup_path_private_files=None,
force=True
)
print("database backup taken -", odb.backup_path_db, "- on", now())
if with_files:
print("files backup taken -", odb.backup_path_files, "- on", now())
print("private files backup taken -", odb.backup_path_private_files, "- on", now())
frappe.destroy()
def main():
installed_sites = ":".join(get_sites())
sites = os.environ.get("SITES", installed_sites).split(":")
with_files = cint(os.environ.get("WITH_FILES"))
backup(sites, with_files)
if frappe.redis_server:
frappe.redis_server.connection_pool.disconnect()
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,130 +0,0 @@
import socket
import time
from six.moves.urllib.parse import urlparse
from utils import get_config
from constants import (
REDIS_QUEUE_KEY,
REDIS_CACHE_KEY,
REDIS_SOCKETIO_KEY,
DB_HOST_KEY,
DB_PORT_KEY,
DB_PORT
)
def is_open(ip, port, timeout=30):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(timeout)
try:
s.connect((ip, int(port)))
s.shutdown(socket.SHUT_RDWR)
return True
except Exception:
return False
finally:
s.close()
def check_host(ip, port, retry=10, delay=3, print_attempt=True):
ipup = False
for i in range(retry):
if print_attempt:
print("Attempt {i} to connect to {ip}:{port}".format(ip=ip, port=port, i=i+1))
if is_open(ip, port):
ipup = True
break
else:
time.sleep(delay)
return ipup
# Check service
def check_service(
retry=10,
delay=3,
print_attempt=True,
service_name=None,
service_port=None):
config = get_config()
if not service_name:
service_name = config.get(DB_HOST_KEY, 'mariadb')
if not service_port:
service_port = config.get(DB_PORT_KEY, DB_PORT)
is_db_connected = False
is_db_connected = check_host(
service_name,
service_port,
retry,
delay,
print_attempt)
if not is_db_connected:
print("Connection to {service_name}:{service_port} timed out".format(
service_name=service_name,
service_port=service_port,
))
exit(1)
# Check redis queue
def check_redis_queue(retry=10, delay=3, print_attempt=True):
check_redis_queue = False
config = get_config()
redis_queue_url = urlparse(config.get(REDIS_QUEUE_KEY, "redis://redis-queue:6379")).netloc
redis_queue, redis_queue_port = redis_queue_url.split(":")
check_redis_queue = check_host(
redis_queue,
redis_queue_port,
retry,
delay,
print_attempt)
if not check_redis_queue:
print("Connection to redis queue timed out")
exit(1)
# Check redis cache
def check_redis_cache(retry=10, delay=3, print_attempt=True):
check_redis_cache = False
config = get_config()
redis_cache_url = urlparse(config.get(REDIS_CACHE_KEY, "redis://redis-cache:6379")).netloc
redis_cache, redis_cache_port = redis_cache_url.split(":")
check_redis_cache = check_host(
redis_cache,
redis_cache_port,
retry,
delay,
print_attempt)
if not check_redis_cache:
print("Connection to redis cache timed out")
exit(1)
# Check redis socketio
def check_redis_socketio(retry=10, delay=3, print_attempt=True):
check_redis_socketio = False
config = get_config()
redis_socketio_url = urlparse(config.get(REDIS_SOCKETIO_KEY, "redis://redis-socketio:6379")).netloc
redis_socketio, redis_socketio_port = redis_socketio_url.split(":")
check_redis_socketio = check_host(
redis_socketio,
redis_socketio_port,
retry,
delay,
print_attempt)
if not check_redis_socketio:
print("Connection to redis socketio timed out")
exit(1)
def main():
check_service()
check_redis_queue()
check_redis_cache()
check_redis_socketio()
print('Connections OK')
if __name__ == "__main__":
main()

View File

@@ -1,32 +0,0 @@
import sys
import frappe
import IPython
from frappe.utils import get_sites
def console(site):
"Start ipython console for a site"
if site not in get_sites():
print("Site {0} does not exist on the current bench".format(site))
return
frappe.init(site=site)
frappe.connect()
frappe.local.lang = frappe.db.get_default("lang")
all_apps = frappe.get_installed_apps()
for app in all_apps:
locals()[app] = __import__(app)
print("Apps in this namespace:\n{}".format(", ".join(all_apps)))
IPython.embed(display_banner="", header="")
def main():
site = sys.argv[-1]
console(site)
if frappe.redis_server:
frappe.redis_server.connection_pool.disconnect()
if __name__ == "__main__":
main()

View File

@@ -1,13 +0,0 @@
REDIS_QUEUE_KEY = 'redis_queue'
REDIS_CACHE_KEY = 'redis_cache'
REDIS_SOCKETIO_KEY = 'redis_socketio'
DB_HOST_KEY = 'db_host'
DB_PORT_KEY = 'db_port'
DB_PORT = 3306
APP_VERSIONS_JSON_FILE = 'app_versions.json'
APPS_TXT_FILE = 'apps.txt'
COMMON_SITE_CONFIG_FILE = 'common_site_config.json'
DATE_FORMAT = "%Y%m%d_%H%M%S"
RDS_DB = 'rds_db'
RDS_PRIVILEGES = "SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, CREATE VIEW, EVENT, TRIGGER, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EXECUTE, LOCK TABLES"
ARCHIVE_SITES_PATH = '/home/frappe/frappe-bench/sites/archive_sites'

View File

@@ -1,61 +0,0 @@
import argparse
from check_connection import (
check_service,
check_redis_cache,
check_redis_queue,
check_redis_socketio,
)
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
'-p',
'--ping-service',
dest='ping_services',
action='append',
type=str,
help='list of services to ping, e.g. doctor -p "postgres:5432" --ping-service "mariadb:3306"',
)
args = parser.parse_args()
return args
def main():
args = parse_args()
check_service(retry=1, delay=0, print_attempt=False)
print("Bench database Connected")
check_redis_cache(retry=1, delay=0, print_attempt=False)
print("Redis Cache Connected")
check_redis_queue(retry=1, delay=0, print_attempt=False)
print("Redis Queue Connected")
check_redis_socketio(retry=1, delay=0, print_attempt=False)
print("Redis SocketIO Connected")
if(args.ping_services):
for service in args.ping_services:
service_name = None
service_port = None
try:
service_name, service_port = service.split(':')
except ValueError:
print('Service should be in format host:port, e.g postgres:5432')
exit(1)
check_service(
retry=1,
delay=0,
print_attempt=False,
service_name=service_name,
service_port=service_port,
)
print("{0}:{1} Connected".format(service_name, service_port))
print("Health check successful")
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,39 +0,0 @@
import os
import frappe
from frappe.commands.site import _drop_site
from constants import ARCHIVE_SITES_PATH
from utils import get_password
def main():
site_name = os.environ.get("SITE_NAME", 'site1.localhost')
db_root_username = os.environ.get("DB_ROOT_USER", 'root')
mariadb_root_password = get_password("MYSQL_ROOT_PASSWORD", 'admin')
postgres_root_password = get_password("POSTGRES_PASSWORD")
db_root_password = mariadb_root_password
if postgres_root_password:
db_root_password = postgres_root_password
force = True if os.environ.get("FORCE", None) else False
no_backup = True if os.environ.get("NO_BACKUP", None) else False
frappe.init(site_name, new_site=True)
_drop_site(
site=site_name,
root_login=db_root_username,
root_password=db_root_password,
archived_sites_path=ARCHIVE_SITES_PATH,
force=force,
no_backup=no_backup
)
if frappe.redis_server:
frappe.redis_server.connection_pool.disconnect()
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,2 +0,0 @@
import gevent.monkey
gevent.monkey.patch_all()

View File

@@ -1,51 +0,0 @@
import os
import frappe
from frappe.utils import cint, get_sites
from utils import get_config, save_config
def set_maintenance_mode(enable=True):
conf = get_config()
if enable:
conf.update({"maintenance_mode": 1, "pause_scheduler": 1})
save_config(conf)
if not enable:
conf.update({"maintenance_mode": 0, "pause_scheduler": 0})
save_config(conf)
def migrate_sites(maintenance_mode=False):
installed_sites = ":".join(get_sites())
sites = os.environ.get("SITES", installed_sites).split(":")
if not maintenance_mode:
maintenance_mode = cint(os.environ.get("MAINTENANCE_MODE"))
if maintenance_mode:
set_maintenance_mode(True)
for site in sites:
print('Migrating', site)
frappe.init(site=site)
frappe.connect()
try:
from frappe.migrate import migrate
migrate()
finally:
frappe.destroy()
# Disable maintenance mode after migration
set_maintenance_mode(False)
def main():
migrate_sites()
if frappe.redis_server:
frappe.redis_server.connection_pool.disconnect()
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,118 +0,0 @@
import os
import frappe
import semantic_version
from frappe.installer import update_site_config
from constants import COMMON_SITE_CONFIG_FILE, RDS_DB, RDS_PRIVILEGES
from utils import (
run_command,
get_config,
get_site_config,
get_password,
)
# try to import _new_site from frappe, which could possibly
# exist in either commands.py or installer.py, and so we need
# to maintain compatibility across all frappe versions.
try:
# <= version-{11,12}
from frappe.commands.site import _new_site
except ImportError:
# >= version-13 and develop
from frappe.installer import _new_site
def main():
config = get_config()
db_type = 'mariadb'
db_port = config.get('db_port', 3306)
db_host = config.get('db_host')
site_name = os.environ.get("SITE_NAME", 'site1.localhost')
db_root_username = os.environ.get("DB_ROOT_USER", 'root')
mariadb_root_password = get_password("MYSQL_ROOT_PASSWORD", 'admin')
postgres_root_password = get_password("POSTGRES_PASSWORD")
db_root_password = mariadb_root_password
if postgres_root_password:
db_type = 'postgres'
db_host = os.environ.get("POSTGRES_HOST")
db_port = 5432
db_root_password = postgres_root_password
if not db_host:
db_host = config.get('db_host')
print('Environment variable POSTGRES_HOST not found.')
print('Using db_host from common_site_config.json')
sites_path = os.getcwd()
common_site_config_path = os.path.join(sites_path, COMMON_SITE_CONFIG_FILE)
update_site_config("root_login", db_root_username, validate = False, site_config_path = common_site_config_path)
update_site_config("root_password", db_root_password, validate = False, site_config_path = common_site_config_path)
force = True if os.environ.get("FORCE", None) else False
install_apps = os.environ.get("INSTALL_APPS", None)
install_apps = install_apps.split(',') if install_apps else []
frappe.init(site_name, new_site=True)
if semantic_version.Version(frappe.__version__).major > 11:
_new_site(
None,
site_name,
mariadb_root_username=db_root_username,
mariadb_root_password=db_root_password,
admin_password=get_password("ADMIN_PASSWORD", 'admin'),
verbose=True,
install_apps=install_apps,
source_sql=None,
force=force,
db_type=db_type,
reinstall=False,
db_host=db_host,
db_port=db_port,
)
else:
_new_site(
None,
site_name,
mariadb_root_username=db_root_username,
mariadb_root_password=db_root_password,
admin_password=get_password("ADMIN_PASSWORD", 'admin'),
verbose=True,
install_apps=install_apps,
source_sql=None,
force=force,
reinstall=False,
)
if db_type == "mariadb":
site_config = get_site_config(site_name)
db_name = site_config.get('db_name')
db_password = site_config.get('db_password')
mysql_command = ["mysql", f"-h{db_host}", f"-u{db_root_username}", f"-p{mariadb_root_password}", "-e"]
# Drop User if exists
command = mysql_command + [f"DROP USER IF EXISTS '{db_name}'; FLUSH PRIVILEGES;"]
run_command(command)
# Grant permission to database and set password
grant_privileges = "ALL PRIVILEGES"
# for Amazon RDS
if config.get(RDS_DB) or site_config.get(RDS_DB):
grant_privileges = RDS_PRIVILEGES
command = mysql_command + [f"\
CREATE USER IF NOT EXISTS '{db_name}'@'%' IDENTIFIED BY '{db_password}'; \
GRANT {grant_privileges} ON `{db_name}`.* TO '{db_name}'@'%'; \
FLUSH PRIVILEGES;"]
run_command(command)
if frappe.redis_server:
frappe.redis_server.connection_pool.disconnect()
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,156 +0,0 @@
import os
import time
import boto3
import datetime
from glob import glob
from frappe.utils import get_sites
from constants import DATE_FORMAT
from utils import (
get_s3_config,
upload_file_to_s3,
check_s3_environment_variables,
)
def get_file_ext():
return {
"database": "-database.sql.gz",
"private_files": "-private-files.tar",
"public_files": "-files.tar",
"site_config": "-site_config_backup.json"
}
def get_backup_details(sitename):
backup_details = dict()
file_ext = get_file_ext()
# add trailing slash https://stackoverflow.com/a/15010678
site_backup_path = os.path.join(os.getcwd(), sitename, "private", "backups", "")
if os.path.exists(site_backup_path):
for filetype, ext in file_ext.items():
site_slug = sitename.replace('.', '_')
pattern = site_backup_path + '*-' + site_slug + ext
backup_files = list(filter(os.path.isfile, glob(pattern)))
if len(backup_files) > 0:
backup_files.sort(key=lambda file: os.stat(os.path.join(site_backup_path, file)).st_ctime)
backup_date = datetime.datetime.strptime(time.ctime(os.path.getmtime(backup_files[0])), "%a %b %d %H:%M:%S %Y")
backup_details[filetype] = {
"sitename": sitename,
"file_size_in_bytes": os.stat(backup_files[-1]).st_size,
"file_path": os.path.abspath(backup_files[-1]),
"filename": os.path.basename(backup_files[-1]),
"backup_date": backup_date.date().strftime("%Y-%m-%d %H:%M:%S")
}
return backup_details
def delete_old_backups(limit, bucket, site_name):
all_backups = list()
all_backup_dates = list()
backup_limit = int(limit)
check_s3_environment_variables()
bucket_dir = os.environ.get('BUCKET_DIR')
oldest_backup_date = None
s3 = boto3.resource(
's3',
region_name=os.environ.get('REGION'),
aws_access_key_id=os.environ.get('ACCESS_KEY_ID'),
aws_secret_access_key=os.environ.get('SECRET_ACCESS_KEY'),
endpoint_url=os.environ.get('ENDPOINT_URL')
)
bucket = s3.Bucket(bucket)
objects = bucket.meta.client.list_objects_v2(
Bucket=bucket.name,
Delimiter='/')
if objects:
for obj in objects.get('CommonPrefixes'):
if obj.get('Prefix') == bucket_dir + '/':
for backup_obj in bucket.objects.filter(Prefix=obj.get('Prefix')):
if backup_obj.get()["ContentType"] == "application/x-directory":
continue
try:
# backup_obj.key is bucket_dir/site/date_time/backupfile.extension
bucket_dir, site_slug, date_time, backupfile = backup_obj.key.split('/')
date_time_object = datetime.datetime.strptime(
date_time, DATE_FORMAT
)
if site_name in backup_obj.key:
all_backup_dates.append(date_time_object)
all_backups.append(backup_obj.key)
except IndexError as error:
print(error)
exit(1)
if len(all_backup_dates) > 0:
oldest_backup_date = min(all_backup_dates)
if len(all_backups) / 3 > backup_limit:
oldest_backup = None
for backup in all_backups:
try:
# backup is bucket_dir/site/date_time/backupfile.extension
backup_dir, site_slug, backup_dt_string, filename = backup.split('/')
backup_datetime = datetime.datetime.strptime(
backup_dt_string, DATE_FORMAT
)
if backup_datetime == oldest_backup_date:
oldest_backup = backup
except IndexError as error:
print(error)
exit(1)
if oldest_backup:
for obj in bucket.objects.filter(Prefix=oldest_backup):
# delete all keys that are inside the oldest_backup
if bucket_dir in obj.key:
print('Deleteing ' + obj.key)
s3.Object(bucket.name, obj.key).delete()
def main():
details = dict()
sites = get_sites()
conn, bucket = get_s3_config()
for site in sites:
details = get_backup_details(site)
db_file = details.get('database', {}).get('file_path')
folder = os.environ.get('BUCKET_DIR') + '/' + site + '/'
if db_file:
folder = os.environ.get('BUCKET_DIR') + '/' + site + '/' + os.path.basename(db_file)[:15] + '/'
upload_file_to_s3(db_file, folder, conn, bucket)
# Archive site_config.json
site_config_file = details.get('site_config', {}).get('file_path')
if not site_config_file:
site_config_file = os.path.join(os.getcwd(), site, 'site_config.json')
upload_file_to_s3(site_config_file, folder, conn, bucket)
public_files = details.get('public_files', {}).get('file_path')
if public_files:
folder = os.environ.get('BUCKET_DIR') + '/' + site + '/' + os.path.basename(public_files)[:15] + '/'
upload_file_to_s3(public_files, folder, conn, bucket)
private_files = details.get('private_files', {}).get('file_path')
if private_files:
folder = os.environ.get('BUCKET_DIR') + '/' + site + '/' + os.path.basename(private_files)[:15] + '/'
upload_file_to_s3(private_files, folder, conn, bucket)
delete_old_backups(os.environ.get('BACKUP_LIMIT', '3'), bucket, site)
print('push-backup complete')
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,294 +0,0 @@
import os
import datetime
import tarfile
import hashlib
import frappe
import boto3
from frappe.utils import get_sites, random_string
from frappe.installer import (
make_conf,
get_conf_params,
make_site_dirs,
update_site_config
)
from constants import COMMON_SITE_CONFIG_FILE, DATE_FORMAT, RDS_DB, RDS_PRIVILEGES
from utils import (
run_command,
list_directories,
set_key_in_site_config,
get_site_config,
get_config,
get_password,
check_s3_environment_variables,
)
def get_backup_dir():
return os.path.join(
os.path.expanduser('~'),
'backups'
)
def decompress_db(database_file, site):
command = ["gunzip", "-c", database_file]
with open(database_file.replace(".gz", ""), "w") as db_file:
print('Extract Database GZip for site {}'.format(site))
run_command(command, stdout=db_file)
def restore_database(files_base, site_config_path, site):
# restore database
database_file = files_base + '-database.sql.gz'
decompress_db(database_file, site)
config = get_config()
# Set db_type if it exists in backup site_config.json
set_key_in_site_config('db_type', site, site_config_path)
# Set db_host if it exists in backup site_config.json
set_key_in_site_config('db_host', site, site_config_path)
# Set db_port if it exists in backup site_config.json
set_key_in_site_config('db_port', site, site_config_path)
# get updated site_config
site_config = get_site_config(site)
# if no db_type exists, default to mariadb
db_type = site_config.get('db_type', 'mariadb')
is_database_restored = False
if db_type == 'mariadb':
restore_mariadb(
config=config,
site_config=site_config,
database_file=database_file)
is_database_restored = True
elif db_type == 'postgres':
restore_postgres(
config=config,
site_config=site_config,
database_file=database_file)
is_database_restored = True
if is_database_restored:
# Set encryption_key if it exists in backup site_config.json
set_key_in_site_config('encryption_key', site, site_config_path)
def restore_files(files_base):
public_files = files_base + '-files.tar'
# extract tar
public_tar = tarfile.open(public_files)
print('Extracting {}'.format(public_files))
public_tar.extractall()
def restore_private_files(files_base):
private_files = files_base + '-private-files.tar'
private_tar = tarfile.open(private_files)
print('Extracting {}'.format(private_files))
private_tar.extractall()
def pull_backup_from_s3():
check_s3_environment_variables()
# https://stackoverflow.com/a/54672690
s3 = boto3.resource(
's3',
region_name=os.environ.get('REGION'),
aws_access_key_id=os.environ.get('ACCESS_KEY_ID'),
aws_secret_access_key=os.environ.get('SECRET_ACCESS_KEY'),
endpoint_url=os.environ.get('ENDPOINT_URL')
)
bucket_dir = os.environ.get('BUCKET_DIR')
bucket_name = os.environ.get('BUCKET_NAME')
bucket = s3.Bucket(bucket_name)
# Change directory to /home/frappe/backups
os.chdir(get_backup_dir())
backup_files = []
sites = set()
site_timestamps = set()
download_backups = []
for obj in bucket.objects.filter(Prefix=bucket_dir):
if obj.get()["ContentType"] == "application/x-directory":
continue
backup_file = obj.key.replace(os.path.join(bucket_dir, ''), '')
backup_files.append(backup_file)
site_name, timestamp, backup_type = backup_file.split('/')
site_timestamp = site_name + '/' + timestamp
sites.add(site_name)
site_timestamps.add(site_timestamp)
# sort sites for latest backups
for site in sites:
backup_timestamps = []
for site_timestamp in site_timestamps:
site_name, timestamp = site_timestamp.split('/')
if site == site_name:
timestamp_datetime = datetime.datetime.strptime(
timestamp, DATE_FORMAT
)
backup_timestamps.append(timestamp)
download_backups.append(site + '/' + max(backup_timestamps))
# Only download latest backups
for backup_file in backup_files:
for backup in download_backups:
if backup in backup_file:
if not os.path.exists(os.path.dirname(backup_file)):
os.makedirs(os.path.dirname(backup_file))
print('Downloading {}'.format(backup_file))
bucket.download_file(bucket_dir + '/' + backup_file, backup_file)
os.chdir(os.path.join(os.path.expanduser('~'), 'frappe-bench', 'sites'))
def restore_postgres(config, site_config, database_file):
# common config
common_site_config_path = os.path.join(os.getcwd(), COMMON_SITE_CONFIG_FILE)
db_root_user = config.get('root_login')
if not db_root_user:
postgres_user = os.environ.get('DB_ROOT_USER')
if not postgres_user:
print('Variable DB_ROOT_USER not set')
exit(1)
db_root_user = postgres_user
update_site_config(
"root_login",
db_root_user,
validate=False,
site_config_path=common_site_config_path)
db_root_password = config.get('root_password')
if not db_root_password:
root_password = get_password('POSTGRES_PASSWORD')
if not root_password:
print('Variable POSTGRES_PASSWORD not set')
exit(1)
db_root_password = root_password
update_site_config(
"root_password",
db_root_password,
validate=False,
site_config_path=common_site_config_path)
# site config
db_host = site_config.get('db_host')
db_port = site_config.get('db_port', 5432)
db_name = site_config.get('db_name')
db_password = site_config.get('db_password')
psql_command = ["psql"]
psql_uri = f"postgres://{db_root_user}:{db_root_password}@{db_host}:{db_port}"
print('Restoring PostgreSQL')
run_command(psql_command + [psql_uri, "-c", f"DROP DATABASE IF EXISTS \"{db_name}\""])
run_command(psql_command + [psql_uri, "-c", f"DROP USER IF EXISTS {db_name}"])
run_command(psql_command + [psql_uri, "-c", f"CREATE DATABASE \"{db_name}\""])
run_command(psql_command + [psql_uri, "-c", f"CREATE user {db_name} password '{db_password}'"])
run_command(psql_command + [psql_uri, "-c", f"GRANT ALL PRIVILEGES ON DATABASE \"{db_name}\" TO {db_name}"])
with open(database_file.replace('.gz', ''), 'r') as db_file:
run_command(psql_command + [f"{psql_uri}/{db_name}", "<"], stdin=db_file)
def restore_mariadb(config, site_config, database_file):
db_root_password = get_password('MYSQL_ROOT_PASSWORD')
if not db_root_password:
print('Variable MYSQL_ROOT_PASSWORD not set')
exit(1)
db_root_user = os.environ.get("DB_ROOT_USER", 'root')
db_host = site_config.get('db_host', config.get('db_host'))
db_port = site_config.get('db_port', config.get('db_port', 3306))
db_name = site_config.get('db_name')
db_password = site_config.get('db_password')
# mysql command prefix
mysql_command = ["mysql", f"-u{db_root_user}", f"-h{db_host}", f"-p{db_root_password}", f"-P{db_port}"]
# drop db if exists for clean restore
drop_database = mysql_command + ["-e", f"DROP DATABASE IF EXISTS `{db_name}`;"]
run_command(drop_database)
# create db
create_database = mysql_command + ["-e", f"CREATE DATABASE IF NOT EXISTS `{db_name}`;"]
run_command(create_database)
# create user
create_user = mysql_command + ["-e", f"CREATE USER IF NOT EXISTS '{db_name}'@'%' IDENTIFIED BY '{db_password}'; FLUSH PRIVILEGES;"]
run_command(create_user)
# grant db privileges to user
grant_privileges = "ALL PRIVILEGES"
# for Amazon RDS
if config.get(RDS_DB) or site_config.get(RDS_DB):
grant_privileges = RDS_PRIVILEGES
grant_privileges_command = mysql_command + ["-e", f"GRANT {grant_privileges} ON `{db_name}`.* TO '{db_name}'@'%' IDENTIFIED BY '{db_password}'; FLUSH PRIVILEGES;"]
run_command(grant_privileges_command)
print('Restoring MariaDB')
with open(database_file.replace('.gz', ''), 'r') as db_file:
run_command(mysql_command + [f"{db_name}"], stdin=db_file)
def main():
backup_dir = get_backup_dir()
if len(list_directories(backup_dir)) == 0:
pull_backup_from_s3()
for site in list_directories(backup_dir):
site_slug = site.replace('.', '_')
backups = [datetime.datetime.strptime(backup, DATE_FORMAT) for backup in list_directories(os.path.join(backup_dir, site))]
latest_backup = max(backups).strftime(DATE_FORMAT)
files_base = os.path.join(backup_dir, site, latest_backup, '')
files_base += latest_backup + '-' + site_slug
site_config_path = files_base + '-site_config_backup.json'
if not os.path.exists(site_config_path):
site_config_path = os.path.join(backup_dir, site, 'site_config.json')
if site in get_sites():
print('Overwrite site {}'.format(site))
restore_database(files_base, site_config_path, site)
restore_private_files(files_base)
restore_files(files_base)
else:
site_config = get_conf_params(
db_name='_' + hashlib.sha1(site.encode()).hexdigest()[:16],
db_password=random_string(16)
)
frappe.local.site = site
frappe.local.sites_path = os.getcwd()
frappe.local.site_path = os.getcwd() + '/' + site
make_conf(
db_name=site_config.get('db_name'),
db_password=site_config.get('db_password'),
)
make_site_dirs()
print('Create site {}'.format(site))
restore_database(files_base, site_config_path, site)
restore_private_files(files_base)
restore_files(files_base)
if frappe.redis_server:
frappe.redis_server.connection_pool.disconnect()
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,204 +0,0 @@
import json
import os
import subprocess
import boto3
import git
from frappe.installer import update_site_config
from constants import (
APP_VERSIONS_JSON_FILE,
APPS_TXT_FILE,
COMMON_SITE_CONFIG_FILE
)
def run_command(command, stdout=None, stdin=None, stderr=None):
stdout = stdout or subprocess.PIPE
stderr = stderr or subprocess.PIPE
stdin = stdin or subprocess.PIPE
process = subprocess.Popen(command, stdout=stdout, stdin=stdin, stderr=stderr)
out, error = process.communicate()
if process.returncode:
print("Something went wrong:")
print(f"return code: {process.returncode}")
print(f"stdout:\n{out}")
print(f"\nstderr:\n{error}")
exit(process.returncode)
def save_version_file(versions):
with open(APP_VERSIONS_JSON_FILE, 'w') as f:
return json.dump(versions, f, indent=1, sort_keys=True)
def get_apps():
apps = []
try:
with open(APPS_TXT_FILE) as apps_file:
for app in apps_file.readlines():
if app.strip():
apps.append(app.strip())
except FileNotFoundError as exception:
print(exception)
exit(1)
except Exception:
print(APPS_TXT_FILE + " is not valid")
exit(1)
return apps
def get_container_versions(apps):
versions = {}
for app in apps:
try:
version = __import__(app).__version__
versions.update({app: version})
except Exception:
pass
try:
path = os.path.join('..', 'apps', app)
repo = git.Repo(path)
commit_hash = repo.head.object.hexsha
versions.update({app+'_git_hash': commit_hash})
except Exception:
pass
return versions
def get_version_file():
versions = None
try:
with open(APP_VERSIONS_JSON_FILE) as versions_file:
versions = json.load(versions_file)
except Exception:
pass
return versions
def get_config():
config = None
try:
with open(COMMON_SITE_CONFIG_FILE) as config_file:
config = json.load(config_file)
except FileNotFoundError as exception:
print(exception)
exit(1)
except Exception:
print(COMMON_SITE_CONFIG_FILE + " is not valid")
exit(1)
return config
def get_site_config(site_name):
site_config = None
with open('{site_name}/site_config.json'.format(site_name=site_name)) as site_config_file:
site_config = json.load(site_config_file)
return site_config
def save_config(config):
with open(COMMON_SITE_CONFIG_FILE, 'w') as f:
return json.dump(config, f, indent=1, sort_keys=True)
def get_password(env_var, default=None):
return os.environ.get(env_var) or get_password_from_secret(f"{env_var}_FILE") or default
def get_password_from_secret(env_var):
"""Fetches the secret value from the docker secret file
usually located inside /run/secrets/
Arguments:
env_var {str} -- Name of the environment variable
containing the path to the secret file.
Returns:
[str] -- Secret value
"""
passwd = None
secret_file_path = os.environ.get(env_var)
if secret_file_path:
with open(secret_file_path) as secret_file:
passwd = secret_file.read().strip()
return passwd
def get_s3_config():
check_s3_environment_variables()
bucket = os.environ.get('BUCKET_NAME')
conn = boto3.client(
's3',
region_name=os.environ.get('REGION'),
aws_access_key_id=os.environ.get('ACCESS_KEY_ID'),
aws_secret_access_key=os.environ.get('SECRET_ACCESS_KEY'),
endpoint_url=os.environ.get('ENDPOINT_URL')
)
return conn, bucket
def upload_file_to_s3(filename, folder, conn, bucket):
destpath = os.path.join(folder, os.path.basename(filename))
try:
print("Uploading file:", filename)
conn.upload_file(filename, bucket, destpath)
except Exception as e:
print("Error uploading: %s" % (e))
exit(1)
def list_directories(path):
directories = []
for name in os.listdir(path):
if os.path.isdir(os.path.join(path, name)):
directories.append(name)
return directories
def get_site_config_from_path(site_config_path):
site_config = dict()
if os.path.exists(site_config_path):
with open(site_config_path, 'r') as sc:
site_config = json.load(sc)
return site_config
def set_key_in_site_config(key, site, site_config_path):
site_config = get_site_config_from_path(site_config_path)
value = site_config.get(key)
if value:
print('Set {key} in site config for site: {site}'.format(key=key, site=site))
update_site_config(key, value,
site_config_path=os.path.join(os.getcwd(), site, "site_config.json"))
def check_s3_environment_variables():
if 'BUCKET_NAME' not in os.environ:
print('Variable BUCKET_NAME not set')
exit(1)
if 'ACCESS_KEY_ID' not in os.environ:
print('Variable ACCESS_KEY_ID not set')
exit(1)
if 'SECRET_ACCESS_KEY' not in os.environ:
print('Variable SECRET_ACCESS_KEY not set')
exit(1)
if 'ENDPOINT_URL' not in os.environ:
print('Variable ENDPOINT_URL not set')
exit(1)
if 'BUCKET_DIR' not in os.environ:
print('Variable BUCKET_DIR not set')
exit(1)
if 'REGION' not in os.environ:
print('Variable REGION not set')
exit(1)

View File

@@ -1,12 +0,0 @@
import os
from frappe.utils.background_jobs import start_worker
def main():
queue = os.environ.get("WORKER_TYPE", "default")
start_worker(queue, False)
exit(0)
if __name__ == "__main__":
main()

View File

@@ -1,8 +0,0 @@
{
"db_host": "${DB_HOST}",
"db_port": ${DB_PORT},
"redis_cache": "redis://${REDIS_CACHE}",
"redis_queue": "redis://${REDIS_QUEUE}",
"redis_socketio": "redis://${REDIS_SOCKETIO}",
"socketio_port": ${SOCKETIO_PORT}
}

View File

@@ -1,118 +0,0 @@
upstream frappe-server {
server ${FRAPPE_PY}:${FRAPPE_PY_PORT} fail_timeout=0;
}
upstream socketio-server {
server ${FRAPPE_SOCKETIO}:${SOCKETIO_PORT} fail_timeout=0;
}
# Parse the X-Forwarded-Proto header - if set - defaulting to $scheme.
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $scheme;
https https;
}
server {
listen 80;
server_name $http_host;
root /var/www/html;
add_header X-Frame-Options "SAMEORIGIN";
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
# Define ${UPSTREAM_REAL_IP_ADDRESS} as our trusted upstream address, so we will be using
# its ${UPSTREAM_REAL_IP_HEADER} address as our remote address
set_real_ip_from ${UPSTREAM_REAL_IP_ADDRESS};
real_ip_header ${UPSTREAM_REAL_IP_HEADER};
real_ip_recursive ${UPSTREAM_REAL_IP_RECURSIVE};
location /assets {
try_files $uri =404;
}
location ~ ^/protected/(.*) {
internal;
try_files /sites/$http_host/$1 =404;
}
location /socket.io {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin $proxy_x_forwarded_proto://$http_host;
proxy_set_header X-Frappe-Site-Name ${FRAPPE_SITE_NAME_HEADER};
proxy_set_header Host ${HTTP_HOST};
proxy_pass http://socketio-server;
}
location / {
rewrite ^(.+)/$ $1 permanent;
rewrite ^(.+)/index\.html$ $1 permanent;
rewrite ^(.+)\.html$ $1 permanent;
location ~ ^/files/.*.(htm|html|svg|xml) {
add_header Content-disposition "attachment";
try_files /sites/$http_host/public/$uri @webserver;
}
try_files /sites/$http_host/public/$uri @webserver;
}
location @webserver {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Frappe-Site-Name ${FRAPPE_SITE_NAME_HEADER};
proxy_set_header Host ${HTTP_HOST};
proxy_set_header X-Use-X-Accel-Redirect True;
proxy_read_timeout ${HTTP_TIMEOUT};
proxy_redirect off;
proxy_pass http://frappe-server;
}
# error pages
error_page 502 /502.html;
location /502.html {
root /var/www/templates;
internal;
}
# optimizations
sendfile on;
keepalive_timeout 15;
client_max_body_size 50m;
client_body_buffer_size 16K;
client_header_buffer_size 1k;
# enable gzip compresion
# based on https://mattstauffer.co/blog/enabling-gzip-on-nginx-servers-including-laravel-forge
gzip on;
gzip_http_version 1.1;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/font-woff
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component;
# text/html is always compressed by HttpGzipModule
}

View File

@@ -1,19 +0,0 @@
#!/home/frappe/frappe-bench/env/bin/python
import subprocess
import sys
import os
if __name__ == "__main__":
bench_dir = os.path.join(os.sep, 'home', 'frappe', 'frappe-bench')
sites_dir = os.path.join(bench_dir, 'sites')
bench_helper = os.path.join(
bench_dir, 'apps', 'frappe',
'frappe', 'utils', 'bench_helper.py',
)
cwd = os.getcwd()
os.chdir(sites_dir)
subprocess.check_call(
[sys.executable, bench_helper, 'frappe'] + sys.argv[1:],
)

View File

@@ -1,173 +0,0 @@
#!/bin/bash
function configureEnv() {
if [[ ! -f /home/frappe/frappe-bench/sites/common_site_config.json ]]; then
if [[ -z "${MARIADB_HOST}" && -z "${POSTGRES_HOST}" ]]; then
echo "MARIADB_HOST or POSTGRES_HOST is not set" >&2
exit 1
fi
if [[ -z "${REDIS_CACHE}" ]]; then
echo "REDIS_CACHE is not set" >&2
exit 1
fi
if [[ -z "${REDIS_QUEUE}" ]]; then
echo "REDIS_QUEUE is not set" >&2
exit 1
fi
if [[ -z "${REDIS_SOCKETIO}" ]]; then
echo "REDIS_SOCKETIO is not set" >&2
exit 1
fi
if [[ -z "${SOCKETIO_PORT}" ]]; then
echo "SOCKETIO_PORT is not set" >&2
exit 1
fi
if [[ -z "${DB_PORT}" ]]; then
export DB_PORT=3306
fi
export DB_HOST="${MARIADB_HOST:-$POSTGRES_HOST}"
envsubst '${DB_HOST}
${DB_PORT}
${REDIS_CACHE}
${REDIS_QUEUE}
${REDIS_SOCKETIO}
${SOCKETIO_PORT}' </opt/frappe/common_site_config.json.template >/home/frappe/frappe-bench/sites/common_site_config.json
fi
}
function checkConnection() {
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/check_connection.py
}
function checkConfigExists() {
COUNTER=0
while [[ ! -e /home/frappe/frappe-bench/sites/common_site_config.json && ${COUNTER} -le 30 ]]; do
sleep 1
((COUNTER = COUNTER + 1))
echo "config file not created, retry ${COUNTER}" >&2
done
if [[ ! -e /home/frappe/frappe-bench/sites/common_site_config.json ]]; then
echo "timeout: config file not created" >&2
exit 1
fi
}
if [[ ! -e /home/frappe/frappe-bench/sites/apps.txt ]]; then
find /home/frappe/frappe-bench/apps -mindepth 1 -maxdepth 1 -type d -printf '%f\n' |
sort -r >/home/frappe/frappe-bench/sites/apps.txt
fi
# symlink node_modules
ln -sfn /home/frappe/frappe-bench/sites/assets/frappe/node_modules \
/home/frappe/frappe-bench/apps/frappe/node_modules
case "$1" in
start)
configureEnv
checkConnection
[[ -z "${WORKERS}" ]] && WORKERS='2'
[[ -z "${FRAPPE_PORT}" ]] && FRAPPE_PORT='8000'
[[ -z "${WORKER_CLASS}" ]] && WORKER_CLASS='gthread'
LOAD_CONFIG_FILE=""
[[ "${WORKER_CLASS}" == "gevent" ]] &&
LOAD_CONFIG_FILE="-c /home/frappe/frappe-bench/commands/gevent_patch.py"
if [[ -n "${AUTO_MIGRATE}" ]]; then
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/auto_migrate.py
fi
/home/frappe/frappe-bench/env/bin/gunicorn ${LOAD_CONFIG_FILE} -b 0.0.0.0:${FRAPPE_PORT} \
--worker-tmp-dir /dev/shm \
--threads=4 \
--workers ${WORKERS} \
--worker-class=${WORKER_CLASS} \
--log-file=- \
-t 120 frappe.app:application --preload
;;
worker)
checkConfigExists
checkConnection
# default WORKER_TYPE=default
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/worker.py
;;
schedule)
checkConfigExists
checkConnection
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/background.py
;;
new)
checkConfigExists
checkConnection
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/new.py
exit
;;
drop)
checkConfigExists
checkConnection
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/drop.py
exit
;;
migrate)
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/migrate.py
exit
;;
doctor)
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/doctor.py "${@:2}"
exit
;;
backup)
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/backup.py
exit
;;
console)
if [[ -z "$2" ]]; then
echo "Need to specify a sitename with the command:" >&2
echo "console <sitename>" >&2
exit 1
fi
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/console.py "$2"
exit
;;
push-backup)
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/push_backup.py
exit
;;
restore-backup)
/home/frappe/frappe-bench/env/bin/python /home/frappe/frappe-bench/commands/restore_backup.py
exit
;;
*)
exec "$@"
;;
esac

View File

@@ -1,45 +0,0 @@
#!/bin/bash
set -ea
function getUrl() {
grep "$2" "$1" | awk -v word="$2" '$word { gsub(/[",]/,"",$2); print $2}' | tr -d '\n'
}
COMMON_SITE_CONFIG_JSON='/home/frappe/frappe-bench/sites/common_site_config.json'
# Set DB Host and port
DB_HOST=$(getUrl "${COMMON_SITE_CONFIG_JSON}" "db_host")
DB_PORT=$(getUrl "${COMMON_SITE_CONFIG_JSON}" "db_port")
if [[ -z "${DB_PORT}" ]]; then
DB_PORT=3306
fi
# Set REDIS host:port
REDIS_CACHE=$(getUrl "${COMMON_SITE_CONFIG_JSON}" "redis_cache" | sed 's|redis://||g')
if [[ "${REDIS_CACHE}" == *"/"* ]]; then
REDIS_CACHE=$(echo ${REDIS_CACHE} | cut -f1 -d"/")
fi
REDIS_QUEUE=$(getUrl "${COMMON_SITE_CONFIG_JSON}" "redis_queue" | sed 's|redis://||g')
if [[ "${REDIS_QUEUE}" == *"/"* ]]; then
REDIS_QUEUE=$(echo ${REDIS_QUEUE} | cut -f1 -d"/")
fi
REDIS_SOCKETIO=$(getUrl "${COMMON_SITE_CONFIG_JSON}" "redis_socketio" | sed 's|redis://||g')
if [[ "${REDIS_SOCKETIO}" == *"/"* ]]; then
REDIS_SOCKETIO=$(echo ${REDIS_SOCKETIO} | cut -f1 -d"/")
fi
echo "Check ${DB_HOST}:${DB_PORT}"
wait-for-it "${DB_HOST}:${DB_PORT}" -t 1
echo "Check ${REDIS_CACHE}"
wait-for-it "${REDIS_CACHE}" -t 1
echo "Check ${REDIS_QUEUE}"
wait-for-it "${REDIS_QUEUE}" -t 1
echo "Check ${REDIS_SOCKETIO}"
wait-for-it "${REDIS_SOCKETIO}" -t 1
if [[ "$1" = "-p" || "$1" = "--ping-service" ]]; then
echo "Check $2"
wait-for-it "$2" -t 1
fi

View File

@@ -1,10 +0,0 @@
#!/bin/bash -ex
APP_NAME=${1}
APP_REPO=${2}
APP_BRANCH=${3}
[[ -n "${APP_BRANCH}" ]] && BRANCH="-b ${APP_BRANCH}"
git clone --depth 1 -o upstream ${APP_REPO} ${BRANCH} /home/frappe/frappe-bench/apps/${APP_NAME}
/home/frappe/frappe-bench/env/bin/pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/${APP_NAME}

View File

@@ -1,29 +0,0 @@
ARG NODE_IMAGE_TAG=14-buster-slim
ARG DOCKER_REGISTRY_PREFIX=frappe
ARG IMAGE_TAG=develop
FROM node:${NODE_IMAGE_TAG}
ARG GIT_REPO=https://github.com/frappe/erpnext
ARG GIT_BRANCH=develop
ARG FRAPPE_BRANCH=${GIT_BRANCH}
COPY build/erpnext-nginx/install_app.sh /install_app
RUN chmod +x /install_app && \
apt-get update -y && \
apt-get install build-essential git python2 -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN /install_app erpnext ${GIT_REPO} ${GIT_BRANCH} ${FRAPPE_BRANCH}
FROM ${DOCKER_REGISTRY_PREFIX}/frappe-nginx:${IMAGE_TAG}
COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/
COPY --from=0 /rsync /rsync
RUN echo "erpnext" >> /var/www/html/apps.txt
VOLUME [ "/assets" ]
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -1,43 +0,0 @@
#!/bin/bash
APP_NAME=${1}
APP_REPO=${2}
APP_BRANCH=${3}
FRAPPE_BRANCH=${4}
[ "${APP_BRANCH}" ] && BRANCH="-b ${APP_BRANCH}"
mkdir -p /home/frappe/frappe-bench/sites/assets
cd /home/frappe/frappe-bench
echo -ne "frappe\n${APP_NAME}" >/home/frappe/frappe-bench/sites/apps.txt
mkdir -p apps
cd apps
git clone --depth 1 https://github.com/frappe/frappe -b ${FRAPPE_BRANCH}
git clone --depth 1 ${APP_REPO} ${BRANCH} ${APP_NAME}
echo "Install frappe NodeJS dependencies . . ."
cd /home/frappe/frappe-bench/apps/frappe
yarn
echo "Install ${APP_NAME} NodeJS dependencies . . ."
cd /home/frappe/frappe-bench/apps/${APP_NAME}
yarn
echo "Build browser assets . . ."
cd /home/frappe/frappe-bench/apps/frappe
yarn production --app ${APP_NAME}
echo "Install frappe NodeJS production dependencies . . ."
cd /home/frappe/frappe-bench/apps/frappe
yarn install --production=true
echo "Install ${APP_NAME} NodeJS production dependencies . . ."
cd /home/frappe/frappe-bench/apps/${APP_NAME}
yarn install --production=true
mkdir -p /home/frappe/frappe-bench/sites/assets/${APP_NAME}
cp -R /home/frappe/frappe-bench/apps/${APP_NAME}/${APP_NAME}/public/* /home/frappe/frappe-bench/sites/assets/${APP_NAME}
# Add frappe and all the apps available under in frappe-bench here
echo "rsync -a --delete /var/www/html/assets/frappe /assets" >/rsync
echo "rsync -a --delete /var/www/html/assets/${APP_NAME} /assets" >>/rsync
chmod +x /rsync
rm /home/frappe/frappe-bench/sites/apps.txt

View File

@@ -1,8 +0,0 @@
ARG IMAGE_TAG=develop
ARG DOCKER_REGISTRY_PREFIX=frappe
FROM ${DOCKER_REGISTRY_PREFIX}/frappe-worker:${IMAGE_TAG}
ARG GIT_REPO=https://github.com/frappe/erpnext
ARG GIT_BRANCH=develop
RUN install_app erpnext ${GIT_REPO} ${GIT_BRANCH}

View File

@@ -1,61 +0,0 @@
# This image uses nvm and same base image as the worker image.
# This is done to ensures that node-sass binary remains common.
# node-sass is required to enable website theme feature used
# by Website Manager role in Frappe Framework
FROM python:3.7-slim-buster
ARG GIT_REPO=https://github.com/frappe/frappe
ARG GIT_BRANCH=develop
ENV NVM_DIR=/root/.nvm
ENV NODE_VERSION=14.17.0
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN apt-get update -y \
&& apt-get install wget python2 git build-essential -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh \
&& chmod +x install.sh \
&& ./install.sh \
&& . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} \
&& nvm use v${NODE_VERSION} && npm install -g yarn
WORKDIR /home/frappe/frappe-bench
RUN mkdir -p /home/frappe/frappe-bench/sites \
&& echo "frappe" > /home/frappe/frappe-bench/sites/apps.txt
RUN mkdir -p apps sites/assets/css \
&& cd apps \
&& git clone --depth 1 ${GIT_REPO} --branch $GIT_BRANCH
RUN cd /home/frappe/frappe-bench/apps/frappe \
&& yarn \
&& yarn run production \
&& yarn install --production=true
RUN node --version \
&& npm --version \
&& yarn --version
RUN git clone --depth 1 https://github.com/frappe/bench /tmp/bench \
&& mkdir -p /var/www/error_pages \
&& cp -r /tmp/bench/bench/config/templates /var/www/error_pages
RUN mkdir -p /home/frappe/frappe-bench/sites/assets/frappe/ \
&& cp -R /home/frappe/frappe-bench/apps/frappe/frappe/public/* /home/frappe/frappe-bench/sites/assets/frappe \
&& cp -R /home/frappe/frappe-bench/apps/frappe/node_modules /home/frappe/frappe-bench/sites/assets/frappe/
FROM nginx:latest
COPY --from=0 /home/frappe/frappe-bench/sites /var/www/html/
COPY --from=0 /var/www/error_pages /var/www/
COPY build/common/nginx-default.conf.template /etc/nginx/conf.d/default.conf.template
COPY build/frappe-nginx/docker-entrypoint.sh /
RUN apt-get update && apt-get install -y rsync && apt-get clean \
&& echo "#!/bin/bash" > /rsync \
&& chmod +x /rsync
VOLUME [ "/assets" ]
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -1,59 +0,0 @@
#!/bin/bash -ae
## Thanks
# https://serverfault.com/a/919212
##
rsync -a --delete /var/www/html/assets/* /assets
/rsync
touch /var/www/html/sites/.build -r "$(ls -td /assets/* | head -n 1)"
[[ -z "${FRAPPE_PY}" ]] && FRAPPE_PY='0.0.0.0'
[[ -z "${FRAPPE_PY_PORT}" ]] && FRAPPE_PY_PORT='8000'
[[ -z "${FRAPPE_SOCKETIO}" ]] && FRAPPE_SOCKETIO='0.0.0.0'
[[ -z "${SOCKETIO_PORT}" ]] && SOCKETIO_PORT='9000'
[[ -z "${HTTP_TIMEOUT}" ]] && HTTP_TIMEOUT='120'
[[ -z "${UPSTREAM_REAL_IP_ADDRESS}" ]] && UPSTREAM_REAL_IP_ADDRESS='127.0.0.1'
[[ -z "${UPSTREAM_REAL_IP_RECURSIVE}" ]] && UPSTREAM_REAL_IP_RECURSIVE='off'
[[ -z "${UPSTREAM_REAL_IP_HEADER}" ]] && UPSTREAM_REAL_IP_HEADER='X-Forwarded-For'
[[ -z "${FRAPPE_SITE_NAME_HEADER}" ]] && FRAPPE_SITE_NAME_HEADER="\$host"
[[ -z "${HTTP_HOST}" ]] && HTTP_HOST="\$http_host"
[[ -z "${SKIP_NGINX_TEMPLATE_GENERATION}" ]] && SKIP_NGINX_TEMPLATE_GENERATION='0'
if [[ ${SKIP_NGINX_TEMPLATE_GENERATION} == 1 ]]; then
echo "Skipping default NGINX template generation. Please mount your own NGINX config file inside /etc/nginx/conf.d"
else
echo "Generating default template"
envsubst '${FRAPPE_PY}
${FRAPPE_PY_PORT}
${FRAPPE_SOCKETIO}
${SOCKETIO_PORT}
${HTTP_TIMEOUT}
${UPSTREAM_REAL_IP_ADDRESS}
${UPSTREAM_REAL_IP_RECURSIVE}
${FRAPPE_SITE_NAME_HEADER}
${HTTP_HOST}
${UPSTREAM_REAL_IP_HEADER}' \
</etc/nginx/conf.d/default.conf.template >/etc/nginx/conf.d/default.conf
fi
echo "Waiting for frappe-python to be available on ${FRAPPE_PY} port ${FRAPPE_PY_PORT}"
timeout 10 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' ${FRAPPE_PY} ${FRAPPE_PY_PORT}
echo "Frappe-python available on ${FRAPPE_PY} port ${FRAPPE_PY_PORT}"
echo "Waiting for frappe-socketio to be available on ${FRAPPE_SOCKETIO} port ${SOCKETIO_PORT}"
timeout 10 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' ${FRAPPE_SOCKETIO} ${SOCKETIO_PORT}
echo "Frappe-socketio available on ${FRAPPE_SOCKETIO} port ${SOCKETIO_PORT}"
exec "$@"

View File

@@ -1,36 +0,0 @@
FROM alpine/git
ARG GIT_REPO=https://github.com/frappe/frappe.git
ARG GIT_BRANCH=develop
RUN git clone ${GIT_REPO} /opt/frappe -b ${GIT_BRANCH} --depth 1
FROM node:buster-slim
# Add frappe user
RUN useradd -ms /bin/bash frappe
# Create bench directories and set ownership
RUN mkdir -p /home/frappe/frappe-bench/sites /home/frappe/frappe-bench/apps/frappe \
&& chown -R frappe:frappe /home/frappe
# Download socketio and purge curl package
COPY build/frappe-socketio/package.json /home/frappe/frappe-bench/apps/frappe
COPY --from=0 /opt/frappe/socketio.js /home/frappe/frappe-bench/apps/frappe/socketio.js
COPY --from=0 /opt/frappe/node_utils.js /home/frappe/frappe-bench/apps/frappe/node_utils.js
RUN cd /home/frappe/frappe-bench/apps/frappe \
&& npm install --only=production \
&& node --version \
&& npm --version
# Setup docker-entrypoint
COPY build/frappe-socketio/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
USER frappe
WORKDIR /home/frappe/frappe-bench/sites
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["start"]

View File

@@ -1,27 +0,0 @@
#!/bin/bash -e
function checkConfigExists() {
COUNTER=0
while [[ ! -e /home/frappe/frappe-bench/sites/common_site_config.json && ${COUNTER} -le 30 ]]; do
((COUNTER = COUNTER + 1))
echo "config file not created, retry ${COUNTER}"
sleep 1
done
if [[ ! -e /home/frappe/frappe-bench/sites/common_site_config.json ]]; then
echo "timeout: config file not created"
exit 1
fi
}
if [[ "$1" == 'start' ]]; then
checkConfigExists
node /home/frappe/frappe-bench/apps/frappe/socketio.js
elif [[ "$1" == 'doctor' ]]; then
node /home/frappe/frappe-bench/apps/frappe/health.js
else
exec -c "$@"
fi

View File

@@ -1,17 +0,0 @@
{
"name": "frappe-socketio",
"version": "1.0.1",
"description": "Frappe SocketIO Server",
"main": "socketio.js",
"scripts": {
"start": "node socketio.js"
},
"author": "Revant Nandgaonkar",
"license": "MIT",
"dependencies": {
"express": "^4.17.1",
"redis": "^3.1.1",
"socket.io": "^2.4.0",
"superagent": "^5.1.0"
}
}

View File

@@ -1,88 +0,0 @@
FROM python:3.7-slim-buster
# Add non root user without password
RUN useradd -ms /bin/bash frappe
ARG GIT_REPO=https://github.com/frappe/frappe
ARG GIT_BRANCH=develop
ARG ARCH=amd64
ENV PYTHONUNBUFFERED 1
ENV NVM_DIR=/home/frappe/.nvm
ENV NODE_VERSION=14.17.0
ENV PATH="/home/frappe/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
# Install dependencies
WORKDIR /home/frappe/frappe-bench
RUN apt-get update -y && apt-get install \
# for frappe framework
git \
mariadb-client \
postgresql-client \
gettext-base \
wget \
wait-for-it \
# for PDF
libjpeg62-turbo \
libx11-6 \
libxcb1 \
libxext6 \
libxrender1 \
libssl-dev \
fonts-cantarell \
xfonts-75dpi \
xfonts-base \
libxml2 \
libffi-dev \
libjpeg-dev \
zlib1g-dev \
# For psycopg2
libpq-dev \
# For arm64 python wheel builds
gcc \
g++ -y \
# Detect arch, download and install wkhtmltox
&& if [ `uname -m` = 'aarch64' ]; then export ARCH=arm64; fi \
&& if [ `uname -m` = 'x86_64' ]; then export ARCH=amd64; fi \
&& wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_${ARCH}.deb \
&& dpkg -i wkhtmltox_0.12.6-1.buster_${ARCH}.deb && rm wkhtmltox_0.12.6-1.buster_${ARCH}.deb \
&& wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh \
&& chown -R frappe:frappe /home/frappe
# Setup docker-entrypoint
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
USER frappe
# Install nvm with node
RUN bash install.sh \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install ${NODE_VERSION} \
&& nvm use v${NODE_VERSION} \
&& nvm alias default v${NODE_VERSION}
# Create frappe-bench directories
RUN mkdir -p apps logs commands sites /home/frappe/backups
# Setup python environment
RUN python -m venv env \
&& . env/bin/activate \
&& pip3 install --upgrade pip \
&& pip3 install gevent \
&& cd apps \
&& git clone --depth 1 -o upstream ${GIT_REPO} --branch ${GIT_BRANCH} \
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/frappe
# Copy scripts and templates
COPY build/common/commands/* /home/frappe/frappe-bench/commands/
COPY build/common/common_site_config.json.template /opt/frappe/common_site_config.json.template
COPY build/common/worker/install_app.sh /usr/local/bin/install_app
COPY build/common/worker/bench /usr/local/bin/bench
COPY build/common/worker/healthcheck.sh /usr/local/bin/healthcheck.sh
# Use sites volume as working directory
WORKDIR /home/frappe/frappe-bench/sites
VOLUME [ "/home/frappe/frappe-bench/sites", "/home/frappe/backups", "/home/frappe/frappe-bench/logs" ]
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["start"]

237
compose.khaeli.yaml Normal file
View File

@@ -0,0 +1,237 @@
name: frappe_docker
services:
backend:
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: frappe/erpnext:v15.83.0
networks:
default: null
platform: linux/amd64
pull_policy: always
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
configurator:
command:
- |
ls -1 apps > sites/apps.txt; bench set-config -g db_host $$DB_HOST; bench set-config -gp db_port $$DB_PORT; bench set-config -g redis_cache "redis://$$REDIS_CACHE"; bench set-config -g redis_queue "redis://$$REDIS_QUEUE"; bench set-config -g redis_socketio "redis://$$REDIS_QUEUE"; bench set-config -gp socketio_port $$SOCKETIO_PORT;
depends_on:
db:
condition: service_healthy
required: true
redis-cache:
condition: service_started
required: true
redis-queue:
condition: service_started
required: true
entrypoint:
- bash
- -c
environment:
DB_HOST: db
DB_PORT: "3306"
REDIS_CACHE: redis-cache:6379
REDIS_QUEUE: redis-queue:6379
SOCKETIO_PORT: "9000"
image: frappe/erpnext:v15.83.0
networks:
default: null
platform: linux/amd64
pull_policy: always
restart: on-failure
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
db:
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
- --skip-innodb-read-only-compressed
environment:
MARIADB_AUTO_UPGRADE: "1"
MYSQL_ROOT_PASSWORD: khaelicloud
healthcheck:
test:
- CMD
- healthcheck.sh
- --connect
- --innodb_initialized
timeout: 5s
interval: 5s
retries: 5
start_period: 5s
image: mariadb:11.8
networks:
default: null
restart: unless-stopped
volumes:
- type: volume
source: db-data
target: /var/lib/mysql
volume: {}
frontend:
command:
- nginx-entrypoint.sh
depends_on:
backend:
condition: service_started
required: true
websocket:
condition: service_started
required: true
environment:
BACKEND: backend:8000
CLIENT_MAX_BODY_SIZE: 50m
FRAPPE_SITE_NAME_HEADER: $$host
PROXY_READ_TIMEOUT: "120"
SOCKETIO: websocket:9000
UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
UPSTREAM_REAL_IP_RECURSIVE: "off"
image: frappe/erpnext:v15.83.0
networks:
default: null
platform: linux/amd64
ports:
- mode: ingress
target: 8080
published: "8080"
protocol: tcp
pull_policy: always
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
queue-long:
command:
- bench
- worker
- --queue
- long,default,short
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: frappe/erpnext:v15.83.0
networks:
default: null
platform: linux/amd64
pull_policy: always
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
queue-short:
command:
- bench
- worker
- --queue
- short,default
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: frappe/erpnext:v15.83.0
networks:
default: null
platform: linux/amd64
pull_policy: always
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
redis-cache:
image: redis:6.2-alpine
networks:
default: null
restart: unless-stopped
redis-queue:
image: redis:6.2-alpine
networks:
default: null
restart: unless-stopped
volumes:
- type: volume
source: redis-queue-data
target: /data
volume: {}
scheduler:
command:
- bench
- schedule
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: frappe/erpnext:v15.83.0
networks:
default: null
platform: linux/amd64
pull_policy: always
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
websocket:
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
depends_on:
configurator:
condition: service_completed_successfully
required: true
image: frappe/erpnext:v15.83.0
networks:
default: null
platform: linux/amd64
pull_policy: always
restart: unless-stopped
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
networks:
default:
name: frappe_docker_default
volumes:
db-data:
name: frappe_docker_db-data
redis-queue-data:
name: frappe_docker_redis-queue-data
sites:
name: frappe_docker_sites
x-backend-defaults:
depends_on:
configurator:
condition: service_completed_successfully
image: frappe/erpnext:v15.83.0
pull_policy: always
restart: unless-stopped
volumes:
- sites:/home/frappe/frappe-bench/sites
x-customizable-image:
image: frappe/erpnext:v15.83.0
pull_policy: always
restart: unless-stopped
x-depends-on-configurator:
depends_on:
configurator:
condition: service_completed_successfully

95
compose.yaml Normal file
View File

@@ -0,0 +1,95 @@
x-customizable-image: &customizable_image
# By default the image used only contains the `frappe` and `erpnext` apps.
# See https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md
# about using custom images.
image: ${CUSTOM_IMAGE:-frappe/erpnext}:${CUSTOM_TAG:-$ERPNEXT_VERSION}
pull_policy: ${PULL_POLICY:-always}
restart: ${RESTART_POLICY:-unless-stopped}
x-depends-on-configurator: &depends_on_configurator
depends_on:
configurator:
condition: service_completed_successfully
x-backend-defaults: &backend_defaults
<<: [*depends_on_configurator, *customizable_image]
volumes:
- sites:/home/frappe/frappe-bench/sites
services:
configurator:
<<: *backend_defaults
platform: linux/amd64
entrypoint:
- bash
- -c
# add redis_socketio for backward compatibility
command:
- >
ls -1 apps > sites/apps.txt;
bench set-config -g db_host $$DB_HOST;
bench set-config -gp db_port $$DB_PORT;
bench set-config -g redis_cache "redis://$$REDIS_CACHE";
bench set-config -g redis_queue "redis://$$REDIS_QUEUE";
bench set-config -g redis_socketio "redis://$$REDIS_QUEUE";
bench set-config -gp socketio_port $$SOCKETIO_PORT;
environment:
DB_HOST: ${DB_HOST:-}
DB_PORT: ${DB_PORT:-}
REDIS_CACHE: ${REDIS_CACHE:-}
REDIS_QUEUE: ${REDIS_QUEUE:-}
SOCKETIO_PORT: 9000
depends_on: {}
restart: on-failure
backend:
<<: *backend_defaults
platform: linux/amd64
frontend:
<<: *customizable_image
platform: linux/amd64
command:
- nginx-entrypoint.sh
environment:
BACKEND: backend:8000
SOCKETIO: websocket:9000
FRAPPE_SITE_NAME_HEADER: ${FRAPPE_SITE_NAME_HEADER:-$$host}
UPSTREAM_REAL_IP_ADDRESS: ${UPSTREAM_REAL_IP_ADDRESS:-127.0.0.1}
UPSTREAM_REAL_IP_HEADER: ${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For}
UPSTREAM_REAL_IP_RECURSIVE: ${UPSTREAM_REAL_IP_RECURSIVE:-off}
PROXY_READ_TIMEOUT: ${PROXY_READ_TIMEOUT:-120}
CLIENT_MAX_BODY_SIZE: ${CLIENT_MAX_BODY_SIZE:-50m}
volumes:
- sites:/home/frappe/frappe-bench/sites
depends_on:
- backend
- websocket
websocket:
<<: [*depends_on_configurator, *customizable_image]
platform: linux/amd64
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
volumes:
- sites:/home/frappe/frappe-bench/sites
queue-short:
<<: *backend_defaults
platform: linux/amd64
command: bench worker --queue short,default
queue-long:
<<: *backend_defaults
platform: linux/amd64
command: bench worker --queue long,default,short
scheduler:
<<: *backend_defaults
platform: linux/amd64
command: bench schedule
# ERPNext requires local assets access (Frappe does not)
volumes:
sites:

Binary file not shown.

View File

@@ -1,19 +1,32 @@
{
"name": "Frappe Bench",
"appPort": [8000, 9000, 6787],
"forwardPorts": [8000, 9000, 6787],
"remoteUser": "frappe",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-vscode.live-server",
"grapecity.gc-excelviewer",
"mtxr.sqltools",
"visualstudioexptteam.vscodeintellicode"
],
"settings": {
"terminal.integrated.profiles.linux": {
"frappe bash": {
"path": "/bin/bash"
}
},
"terminal.integrated.defaultProfile.linux": "frappe bash",
"debug.node.autoAttach": "disabled"
}
}
},
"dockerComposeFile": "./docker-compose.yml",
"service": "frappe",
"workspaceFolder": "/workspace/development",
"shutdownAction": "stopCompose",
"extensions": [
"ms-python.python",
"auchenberg.vscode-browser-preview",
"grapecity.gc-excelviewer",
"mtxr.sqltools",
"visualstudioexptteam.vscodeintellicode"
"mounts": [
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/frappe/.ssh,type=bind,consistency=cached"
]
}

View File

@@ -1,42 +1,90 @@
version: "3.7"
services:
mariadb:
image: mariadb:10.3
image: docker.io/mariadb:11.8
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
- --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
environment:
- MYSQL_ROOT_PASSWORD=123
- MYSQL_USER=root
MYSQL_ROOT_PASSWORD: 123
MARIADB_AUTO_UPGRADE: 1
volumes:
- ../installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
- mariadb-vol:/var/lib/mysql
- mariadb-data:/var/lib/mysql
# Enable PostgreSQL only if you use it, see development/README.md for more information.
# postgresql:
# image: postgres:11.8
# restart: on-failure
# image: postgres:14
# environment:
# - POSTGRES_PASSWORD=123
# POSTGRES_PASSWORD: 123
# volumes:
# - postgresql-vol:/var/lib/postgresql/data
# - postgresql-data:/var/lib/postgresql/data
# Enable Mailpit if you need to test outgoing mail services
# See https://mailpit.axllent.org/
# mailpit:
# image: axllent/mailpit
# volumes:
# - mailpit-data:/data
# ports:
# - 8025:8025
# - 1025:1025
# environment:
# MP_MAX_MESSAGES: 5000
# MP_DATA_FILE: /data/mailpit.db
# MP_SMTP_AUTH_ACCEPT_ANY: 1
# MP_SMTP_AUTH_ALLOW_INSECURE: 1
redis-cache:
image: redis:alpine
image: docker.io/redis:alpine
redis-queue:
image: redis:alpine
redis-socketio:
image: redis:alpine
image: docker.io/redis:alpine
frappe:
image: frappe/bench:latest
image: docker.io/frappe/bench:latest
# If you want to build the current bench image the Containerfile is in this Repo.
# build: ../images/bench
command: sleep infinity
environment:
- SHELL=/bin/bash
volumes:
- ..:/workspace:cached
# Enable if you require git cloning
# - ${HOME}/.ssh:/home/frappe/.ssh
working_dir: /workspace/development
ports:
- "8000-8005:8000-8005"
- "9000-9005:9000-9005"
- 8000-8005:8000-8005
- 9000-9005:9000-9005
# enable the below service if you need Cypress UI Tests to be executed
# Before enabling ensure install_x11_deps.sh has been executed and display variable is exported.
# Run install_x11_deps.sh again if DISPLAY is not set
# ui-tester:
# # pass custom command to start Cypress otherwise it will use the entrypoint
# # specified in the Cypress Docker image.
# # also pass "--project <folder>" so that when Cypress opens
# # it can find file "cypress.json" and show integration specs
# # https://on.cypress.io/command-line#cypress-open
# entrypoint: 'sleep infinity'
# image: "docker.io/cypress/included:latest"
# environment:
# - SHELL=/bin/bash
# # get the IP address of the host machine and allow X11 to accept
# # incoming connections from that IP address
# # IP=$(ipconfig getifaddr en0) or mac or \
# # IP=$($(hostname -I | awk '{print $1}') ) for Ubuntu
# # /usr/X11/bin/xhost + $IP
# # then pass the environment variable DISPLAY to show Cypress GUI on the host system
# # DISPLAY=$IP:0
# - DISPLAY
# volumes:
# # for Cypress to communicate with the X11 server pass this socket file
# # in addition to any other mapped volumes
# - /tmp/.X11-unix:/tmp/.X11-unix
# - ..:/workspace:z,cached
# network_mode: "host"
volumes:
mariadb-vol:
postgresql-vol:
mariadb-data:
#postgresql-data:
#mailpit-data:

View File

@@ -1,71 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Bench Web",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe", "serve", "--port", "8000", "--noreload", "--nothreading"
],
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Bench Default Worker",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe", "worker", "--queue", "default"
],
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Bench Short Worker",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe", "worker", "--queue", "short"
],
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Bench Long Worker",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe", "worker", "--queue", "long"
],
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Honcho SocketIO Watch Schedule Worker",
"type": "python",
"request": "launch",
"program": "/home/frappe/.local/bin/honcho",
"cwd": "${workspaceFolder}/frappe-bench",
"console": "internalConsole",
"args": [
"start", "socketio", "watch", "schedule", "worker_short", "worker_long", "worker_default"
]
}
]
}

View File

@@ -1,4 +0,0 @@
{
"python.pythonPath": "frappe-bench/env/bin/python",
"debug.node.autoAttach": "disabled"
}

View File

@@ -1,287 +0,0 @@
# Getting Started
## Prerequisites
In order to start developing you need to satisfy the following prerequisites:
- Docker
- docker-compose
- user added to docker group
It is recommended you allocate at least 4GB of RAM to docker:
- [Instructions for Windows](https://docs.docker.com/docker-for-windows/#resources)
- [Instructions for macOS](https://docs.docker.com/docker-for-mac/#resources)
## Bootstrap Containers for development
Clone and change directory to frappe_docker directory
```shell
git clone https://github.com/frappe/frappe_docker.git
cd frappe_docker
```
Copy example devcontainer config from `devcontainer-example` to `.devcontainer`
```shell
cp -R devcontainer-example .devcontainer
```
## Use VSCode Remote Containers extension
For most people getting started with Frappe development, the best solution is to use [VSCode Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
Before opening the folder in container, determine the database that you want to use. The default is MariaDB.
If you want to use PostgreSQL instead, edit `.devcontainer/docker-compose.yml` and uncomment the section for `postgresql` service, and you may also want to comment `mariadb` as well.
VSCode should automatically inquire you to install the required extensions, that can also be installed manually as follows:
- Install Remote - Containers for VSCode
- through command line `code --install-extension ms-vscode-remote.remote-containers`
- clicking on the Install button in the Vistual Studio Marketplace: [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
- View: Extensions command in VSCode (Windows: Ctrl+Shift+X; macOS: Cmd+Shift+X) then search for extension `ms-vscode-remote.remote-containers`
After the extensions are installed, you can:
- Open frappe_docker folder in VS Code.
- `code .`
- Launch the command, from Command Palette (Ctrl + Shift + P) `Execute Remote Containers : Reopen in Container`. You can also click in the bottom left corner to access the remote container menu.
Notes:
- The `development` directory is ignored by git. It is mounted and available inside the container. Create all your benches (installations of bench, the tool that manages frappe) inside this directory.
- nvm with node v12 and v10 is installed. Check with `nvm ls`. Node v12 is used by default.
### Setup first bench
Run the following commands in the terminal inside the container. You might need to create a new terminal in VSCode.
```shell
bench init --skip-redis-config-generation --frappe-branch version-12 frappe-bench
cd frappe-bench
```
### Setup hosts
We need to tell bench to use the right containers instead of localhost. Run the following commands inside the container:
```shell
bench set-mariadb-host mariadb
bench set-redis-cache-host redis-cache:6379
bench set-redis-queue-host redis-queue:6379
bench set-redis-socketio-host redis-socketio:6379
```
### Edit Honcho's Procfile
Note : With the option '--skip-redis-config-generation' during bench init, these actions are no more needed. But at least, take a look to ProcFile to see what going on when bench launch honcho on start command
Honcho is the tool used by Bench to manage all the processes Frappe requires. Usually, these all run in localhost, but in this case, we have external containers for Redis. For this reason, we have to stop Honcho from trying to start Redis processes.
Open the Procfile file and remove the three lines containing the configuration from Redis, either by editing manually the file:
```shell
code Procfile
```
Or running the following command:
```shell
sed -i '/redis/d' ./Procfile
```
### Create a new site with bench
You can create a new site with the following command:
```shell
bench new-site sitename --no-mariadb-socket
```
sitename MUST end with .localhost for trying deployments locally.
for example:
```shell
bench new-site mysite.localhost --no-mariadb-socket
```
The same command can be run non-interactively as well:
```shell
bench new-site mysite.localhost --mariadb-root-password 123 --admin-password admin --no-mariadb-socket
```
The command will ask the MariaDB root password. The default root password is `123`.
This will create a new site and a `mysite.localhost` directory under `frappe-bench/sites`.
The option `--no-mariadb-socket` will configure site's database credentials to work with docker.
You may need to configure your system /etc/hosts if you're on Linux, Mac, or its Windows equivalent.
To setup site with PostgreSQL as database use option `--db-type postgres` and `--db-host postgresql`. (Available only v12 onwards, currently NOT available for ERPNext).
Example:
```shell
bench new-site mypgsql.localhost --db-type postgres --db-host postgresql
```
To avoid entering postgresql username and root password, set it in `common_site_config.json`,
```shell
bench config set-common-config -c root_login postgres
bench config set-common-config -c root_password '"123"'
```
Note: If PostgreSQL is not required, the postgresql service / container can be stopped.
### Set bench developer mode on the new site
To develop a new app, the last step will be setting the site into developer mode. Documentation is available at [this link](https://frappe.io/docs/user/en/guides/app-development/how-enable-developer-mode-in-frappe).
```shell
bench --site mysite.localhost set-config developer_mode 1
bench --site mysite.localhost clear-cache
```
### Install an app
To install an app we need to fetch it from the appropriate git repo, then install in on the appropriate site:
You can check [VSCode container remote extension documentation](https://code.visualstudio.com/docs/remote/containers#_sharing-git-credentials-with-your-container) regarding git credential sharing.
To install custom app
```shell
# --branch is optional, use it to point to branch on custom app repository
bench get-app --branch version-12 myapp https://github.com/myusername/myapp.git
bench --site mysite.localhost install-app myapp
```
To install ERPNext (from the version-12 branch):
```shell
bench get-app --branch version-12 erpnext https://github.com/frappe/erpnext.git
bench --site mysite.localhost install-app erpnext
```
Note: Both frappe and erpnext must be on branch with same name. e.g. version-12
### Start Frappe without debugging
Execute following command from the `frappe-bench` directory.
```shell
bench start
```
You can now login with user `Administrator` and the password you choose when creating the site.
Your website will now be accessible at location [mysite.localhost:8000](http://mysite.localhost:8000)
Note: To start bench with debugger refer section for debugging.
### Start Frappe with Visual Studio Code Python Debugging
To enable Python debugging inside Visual Studio Code, you must first install the `ms-python.python` extension inside the container. This should have already happened automatically, but depending on your VSCode config, you can force it by:
- Click on the extension icon inside VSCode
- Search `ms-python.python`
- Click on `Install on Dev Container: Frappe Bench`
- Click on 'Reload'
We need to start bench separately through the VSCode debugger. For this reason, **instead** of running `bench start` you should run the following command inside the frappe-bench directory:
```shell
honcho start \
socketio \
watch \
schedule \
worker_short \
worker_long \
worker_default
```
Alternatively you can use the VSCode launch configuration "Honcho SocketIO Watch Schedule Worker" which launches the same command as above.
This command starts all processes with the exception of Redis (which is already running in separate container) and the `web` process. The latter can can finally be started from the debugger tab of VSCode by clicking on the "play" button.
You can now login with user `Administrator` and the password you choose when creating the site, if you followed this guide's unattended install that password is going to be `admin`.
To debug workers, skip starting worker with honcho and start it with VSCode debugger.
## Developing using the interactive console
You can launch a simple interactive shell console in the terminal with:
```shell
bench --site mysite.localhost console
```
More likely, you may want to launch VSCode interactive console based on Jupyter kernel.
Launch VSCode command palette (cmd+shift+p or ctrl+shift+p), run the command `Python: Select interpreter to start Jupyter server` and select `/workspace/development/frappe-bench/env/bin/python`.
The first step is installing and updating the required software. Usually the frappe framework may require an older version of Jupyter, while VSCode likes to move fast, this can [cause issues](https://github.com/jupyter/jupyter_console/issues/158). For this reason we need to run the following command.
```shell
/workspace/development/frappe-bench/env/bin/python -m pip install --upgrade jupyter ipykernel ipython
```
Then, run the commmand `Python: Show Python interactive window` from the VSCode command palette.
Replace `mysite.localhost` with your site and run the following code in a Jupyter cell:
```python
import frappe
frappe.init(site='mysite.localhost', sites_path='/workspace/development/frappe-bench/sites')
frappe.connect()
frappe.local.lang = frappe.db.get_default('lang')
frappe.db.connect()
```
The first command can take a few seconds to be executed, this is to be expected.
### Fixing MariaDB issues after rebuilding the container
For any reason after rebuilding the container if you are not be able to access MariaDB correctly with the previous configuration. Follow these instructions.
The parameter `'db_name'@'%'` needs to be set in MariaDB and permission to the site database suitably assigned to the user.
This step has to be repeated for all sites available under the current bench.
Example shows the queries to be executed for site `localhost`
Open sites/localhost/site_config.json:
```shell
code sites/localhost/site_config.json
```
and take note of the parameters `db_name` and `db_password`.
Enter MariaDB Interactive shell:
```shell
mysql -uroot -p123 -hmariadb
```
Execute following queries replacing `db_name` and `db_password` with the values found in site_config.json.
```sql
UPDATE mysql.user SET Host = '%' where User = 'db_name'; FLUSH PRIVILEGES;
SET PASSWORD FOR 'db_name'@'%' = PASSWORD('db_password'); FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON `db_name`.* TO 'db_name'@'%'; FLUSH PRIVILEGES;
EXIT;
```
## Manually start containers
In case you don't use VSCode, you may start the containers manually with the following command:
### Running the containers
```shell
docker-compose -f .devcontainer/docker-compose.yml up -d
```
And enter the interactive shell for the development container with the following command:
```shell
docker exec -e "TERM=xterm-256color" -w /workspace/development -it devcontainer_frappe_1 bash
```

View File

@@ -0,0 +1,6 @@
[
{
"url": "https://github.com/frappe/erpnext.git",
"branch": "version-15"
}
]

245
development/installer.py Executable file
View File

@@ -0,0 +1,245 @@
#!/usr/bin/env python3
import argparse
import os
import subprocess
def cprint(*args, level: int = 1):
"""
logs colorful messages
level = 1 : RED
level = 2 : GREEN
level = 3 : YELLOW
default level = 1
"""
CRED = "\033[31m"
CGRN = "\33[92m"
CYLW = "\33[93m"
reset = "\033[0m"
message = " ".join(map(str, args))
if level == 1:
print(CRED, message, reset) # noqa: T001, T201
if level == 2:
print(CGRN, message, reset) # noqa: T001, T201
if level == 3:
print(CYLW, message, reset) # noqa: T001, T201
def main():
parser = get_args_parser()
args = parser.parse_args()
init_bench_if_not_exist(args)
create_site_in_bench(args)
def get_args_parser():
parser = argparse.ArgumentParser()
parser.add_argument(
"-j",
"--apps-json",
action="store",
type=str,
help="Path to apps.json, default: apps-example.json",
default="apps-example.json",
) # noqa: E501
parser.add_argument(
"-b",
"--bench-name",
action="store",
type=str,
help="Bench directory name, default: frappe-bench",
default="frappe-bench",
) # noqa: E501
parser.add_argument(
"-s",
"--site-name",
action="store",
type=str,
help="Site name, should end with .localhost, default: development.localhost", # noqa: E501
default="development.localhost",
)
parser.add_argument(
"-r",
"--frappe-repo",
action="store",
type=str,
help="frappe repo to use, default: https://github.com/frappe/frappe", # noqa: E501
default="https://github.com/frappe/frappe",
)
parser.add_argument(
"-t",
"--frappe-branch",
action="store",
type=str,
help="frappe repo to use, default: version-15", # noqa: E501
default="version-15",
)
parser.add_argument(
"-p",
"--py-version",
action="store",
type=str,
help="python version, default: Not Set", # noqa: E501
default=None,
)
parser.add_argument(
"-n",
"--node-version",
action="store",
type=str,
help="node version, default: Not Set", # noqa: E501
default=None,
)
parser.add_argument(
"-v",
"--verbose",
action="store_true",
help="verbose output", # noqa: E501
)
parser.add_argument(
"-a",
"--admin-password",
action="store",
type=str,
help="admin password for site, default: admin", # noqa: E501
default="admin",
)
parser.add_argument(
"-d",
"--db-type",
action="store",
type=str,
help="Database type to use (e.g., mariadb or postgres)",
default="mariadb", # Set your default database type here
)
return parser
def init_bench_if_not_exist(args):
if os.path.exists(args.bench_name):
cprint("Bench already exists. Only site will be created", level=3)
return
try:
env = os.environ.copy()
if args.py_version:
env["PYENV_VERSION"] = args.py_version
init_command = ""
if args.node_version:
init_command = f"nvm use {args.node_version};"
if args.py_version:
init_command += f"PYENV_VERSION={args.py_version} "
init_command += "bench init "
init_command += "--skip-redis-config-generation "
init_command += "--verbose " if args.verbose else " "
init_command += f"--frappe-path={args.frappe_repo} "
init_command += f"--frappe-branch={args.frappe_branch} "
init_command += f"--apps_path={args.apps_json} "
init_command += args.bench_name
command = [
"/bin/bash",
"-i",
"-c",
init_command,
]
subprocess.call(command, env=env, cwd=os.getcwd())
cprint("Configuring Bench ...", level=2)
cprint("Set db_host", level=3)
if args.db_type:
cprint(f"Setting db_type to {args.db_type}", level=3)
subprocess.call(
["bench", "set-config", "-g", "db_type", args.db_type],
cwd=os.path.join(os.getcwd(), args.bench_name),
)
cprint("Set redis_cache to redis://redis-cache:6379", level=3)
subprocess.call(
[
"bench",
"set-config",
"-g",
"redis_cache",
"redis://redis-cache:6379",
],
cwd=os.getcwd() + "/" + args.bench_name,
)
cprint("Set redis_queue to redis://redis-queue:6379", level=3)
subprocess.call(
[
"bench",
"set-config",
"-g",
"redis_queue",
"redis://redis-queue:6379",
],
cwd=os.getcwd() + "/" + args.bench_name,
)
cprint(
"Set redis_socketio to redis://redis-queue:6379 for backward compatibility", # noqa: E501
level=3,
)
subprocess.call(
[
"bench",
"set-config",
"-g",
"redis_socketio",
"redis://redis-queue:6379",
],
cwd=os.getcwd() + "/" + args.bench_name,
)
cprint("Set developer_mode", level=3)
subprocess.call(
["bench", "set-config", "-gp", "developer_mode", "1"],
cwd=os.getcwd() + "/" + args.bench_name,
)
except subprocess.CalledProcessError as e:
cprint(e.output, level=1)
def create_site_in_bench(args):
if "mariadb" == args.db_type:
cprint("Set db_host", level=3)
subprocess.call(
["bench", "set-config", "-g", "db_host", "mariadb"],
cwd=os.getcwd() + "/" + args.bench_name,
)
new_site_cmd = [
"bench",
"new-site",
f"--db-root-username=root",
f"--db-host=mariadb", # Should match the compose service name
f"--db-type={args.db_type}", # Add the selected database type
f"--mariadb-user-host-login-scope=%",
f"--db-root-password=123", # Replace with your MariaDB password
f"--admin-password={args.admin_password}",
]
else:
cprint("Set db_host", level=3)
subprocess.call(
["bench", "set-config", "-g", "db_host", "postgresql"],
cwd=os.getcwd() + "/" + args.bench_name,
)
new_site_cmd = [
"bench",
"new-site",
f"--db-root-username=root",
f"--db-host=postgresql", # Should match the compose service name
f"--db-type={args.db_type}", # Add the selected database type
f"--db-root-password=123", # Replace with your PostgreSQL password
f"--admin-password={args.admin_password}",
]
apps = os.listdir(f"{os.getcwd()}/{args.bench_name}/apps")
apps.remove("frappe")
for app in apps:
new_site_cmd.append(f"--install-app={app}")
new_site_cmd.append(args.site_name)
cprint(f"Creating Site {args.site_name} ...", level=2)
subprocess.call(
new_site_cmd,
cwd=os.getcwd() + "/" + args.bench_name,
)
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,77 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Bench Web",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe",
"serve",
"--port",
"8000",
"--noreload",
"--nothreading"
],
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Bench Short Worker",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": ["frappe", "worker", "--queue", "short"],
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Bench Default Worker",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": ["frappe", "worker", "--queue", "default"],
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Bench Long Worker",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": ["frappe", "worker", "--queue", "long"],
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Honcho SocketIO Watch Schedule Worker",
"type": "debugpy",
"request": "launch",
"python": "/home/frappe/.pyenv/shims/python",
"program": "/home/frappe/.local/bin/honcho",
"cwd": "${workspaceFolder}/frappe-bench",
"console": "internalConsole",
"args": ["start", "socketio", "watch", "schedule", "worker"],
"postDebugTask": "Clean Honcho SocketIO Watch Schedule Worker"
}
],
"compounds": [
{
"name": "Honcho + Web debug",
"configurations": ["Bench Web", "Honcho SocketIO Watch Schedule Worker"],
"stopAll": true
}
]
}

View File

@@ -0,0 +1,3 @@
{
"python.defaultInterpreterPath": "${workspaceFolder}/frappe-bench/env/bin/python"
}

View File

@@ -0,0 +1,22 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Clean Honcho SocketIO Watch Schedule Worker",
"detail": "When stopping the debug process from vscode window, the honcho won't receive the SIGINT signal. This task will send the SIGINT signal to the honcho processes.",
"type": "shell",
"command": "pkill -SIGINT -f bench; pkill -SIGINT -f socketio",
"isBackground": false,
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"close": true
}
}
]
}

113
docker-bake.hcl Normal file
View File

@@ -0,0 +1,113 @@
# Docker Buildx Bake build definition file
# Reference: https://github.com/docker/buildx/blob/master/docs/reference/buildx_bake.md
variable "REGISTRY_USER" {
default = "frappe"
}
variable PYTHON_VERSION {
default = "3.11.6"
}
variable NODE_VERSION {
default = "20.19.2"
}
variable "FRAPPE_VERSION" {
default = "develop"
}
variable "ERPNEXT_VERSION" {
default = "develop"
}
variable "FRAPPE_REPO" {
default = "https://github.com/frappe/frappe"
}
variable "ERPNEXT_REPO" {
default = "https://github.com/frappe/erpnext"
}
variable "BENCH_REPO" {
default = "https://github.com/frappe/bench"
}
variable "LATEST_BENCH_RELEASE" {
default = "latest"
}
# Bench image
target "bench" {
args = {
GIT_REPO = "${BENCH_REPO}"
}
context = "images/bench"
target = "bench"
tags = [
"frappe/bench:${LATEST_BENCH_RELEASE}",
"frappe/bench:latest",
]
}
target "bench-test" {
inherits = ["bench"]
target = "bench-test"
}
# Main images
# Base for all other targets
group "default" {
targets = ["erpnext", "base", "build"]
}
function "tag" {
params = [repo, version]
result = [
# Push frappe or erpnext branch as tag
"${REGISTRY_USER}/${repo}:${version}",
# If `version` param is develop (development build) then use tag `latest`
"${version}" == "develop" ? "${REGISTRY_USER}/${repo}:latest" : "${REGISTRY_USER}/${repo}:${version}",
# Make short tag for major version if possible. For example, from v13.16.0 make v13.
can(regex("(v[0-9]+)[.]", "${version}")) ? "${REGISTRY_USER}/${repo}:${regex("(v[0-9]+)[.]", "${version}")[0]}" : "",
# Make short tag for major version if possible. For example, from v13.16.0 make version-13.
can(regex("(v[0-9]+)[.]", "${version}")) ? "${REGISTRY_USER}/${repo}:version-${regex("([0-9]+)[.]", "${version}")[0]}" : "",
]
}
target "default-args" {
args = {
FRAPPE_PATH = "${FRAPPE_REPO}"
ERPNEXT_PATH = "${ERPNEXT_REPO}"
BENCH_REPO = "${BENCH_REPO}"
FRAPPE_BRANCH = "${FRAPPE_VERSION}"
ERPNEXT_BRANCH = "${ERPNEXT_VERSION}"
PYTHON_VERSION = "${PYTHON_VERSION}"
NODE_VERSION = "${NODE_VERSION}"
}
}
target "erpnext" {
inherits = ["default-args"]
context = "."
dockerfile = "images/production/Containerfile"
target = "erpnext"
tags = tag("erpnext", "${ERPNEXT_VERSION}")
}
target "base" {
inherits = ["default-args"]
context = "."
dockerfile = "images/production/Containerfile"
target = "base"
tags = tag("base", "${FRAPPE_VERSION}")
}
target "build" {
inherits = ["default-args"]
context = "."
dockerfile = "images/production/Containerfile"
target = "build"
tags = tag("build", "${ERPNEXT_VERSION}")
}

View File

@@ -1,174 +0,0 @@
version: "3"
services:
traefik:
image: "traefik:v2.2"
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.myresolver.acme.email=${LETSENCRYPT_EMAIL}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
labels:
# enable traefik
- "traefik.enable=true"
# global redirect to https for production only
- "${HTTPS_REDIRECT_RULE_LABEL}"
- "${HTTPS_REDIRECT_ENTRYPOINT_LABEL}"
- "${HTTPS_REDIRECT_MIDDLEWARE_LABEL}"
# middleware redirect for production only
- "${HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL}"
ports:
- "80:80"
- "443:443"
volumes:
- cert-vol:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
userns_mode: "host"
erpnext-nginx:
image: frappe/erpnext-nginx:${ERPNEXT_VERSION}
restart: on-failure
environment:
- FRAPPE_PY=erpnext-python
- FRAPPE_PY_PORT=8000
- FRAPPE_SOCKETIO=frappe-socketio
- SOCKETIO_PORT=9000
- SKIP_NGINX_TEMPLATE_GENERATION=${SKIP_NGINX_TEMPLATE_GENERATION}
labels:
- "traefik.enable=true"
- "traefik.http.routers.erpnext-nginx.rule=Host(${SITES})"
- "${ENTRYPOINT_LABEL}"
- "${CERT_RESOLVER_LABEL}"
- "traefik.http.services.erpnext-nginx.loadbalancer.server.port=80"
volumes:
- sites-vol:/var/www/html/sites:rw
- assets-vol:/assets:rw
erpnext-python:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
environment:
- MARIADB_HOST=${MARIADB_HOST}
- REDIS_CACHE=redis-cache:6379
- REDIS_QUEUE=redis-queue:6379
- REDIS_SOCKETIO=redis-socketio:6379
- SOCKETIO_PORT=9000
- AUTO_MIGRATE=1
- WORKER_CLASS=${WORKER_CLASS}
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- assets-vol:/home/frappe/frappe-bench/sites/assets:rw
frappe-socketio:
image: frappe/frappe-socketio:${FRAPPE_VERSION}
restart: on-failure
depends_on:
- redis-socketio
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
erpnext-worker-default:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
command: worker
depends_on:
- redis-queue
- redis-cache
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
erpnext-worker-short:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
command: worker
environment:
- WORKER_TYPE=short
depends_on:
- redis-queue
- redis-cache
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
erpnext-worker-long:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
command: worker
environment:
- WORKER_TYPE=long
depends_on:
- redis-queue
- redis-cache
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
erpnext-schedule:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: on-failure
command: schedule
depends_on:
- redis-queue
- redis-cache
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
redis-cache:
image: redis:latest
restart: on-failure
volumes:
- redis-cache-vol:/data
redis-queue:
image: redis:latest
restart: on-failure
volumes:
- redis-queue-vol:/data
redis-socketio:
image: redis:latest
restart: on-failure
volumes:
- redis-socketio-vol:/data
mariadb:
image: mariadb:10.3
restart: on-failure
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ./installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
- mariadb-vol:/var/lib/mysql
site-creator:
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
restart: "no"
command: new
depends_on:
- erpnext-python
environment:
- SITE_NAME=${SITE_NAME}
- DB_ROOT_USER=${DB_ROOT_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- INSTALL_APPS=${INSTALL_APPS}
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- logs-vol:/home/frappe/frappe-bench/logs:rw
volumes:
mariadb-vol:
redis-cache-vol:
redis-queue-vol:
redis-socketio-vol:
assets-vol:
sites-vol:
cert-vol:
logs-vol:

View File

@@ -0,0 +1,58 @@
Create backup service or stack.
```yaml
# backup-job.yml
version: "3.7"
services:
backup:
image: frappe/erpnext:${VERSION}
entrypoint: ["bash", "-c"]
command:
- |
bench --site all backup
## Uncomment for restic snapshots.
# restic snapshots || restic init
# restic backup sites
## Uncomment to keep only last n=30 snapshots.
# restic forget --group-by=paths --keep-last=30 --prune
environment:
# Set correct environment variables for restic
- RESTIC_REPOSITORY=s3:https://s3.endpoint.com/restic
- AWS_ACCESS_KEY_ID=access_key
- AWS_SECRET_ACCESS_KEY=secret_access_key
- RESTIC_PASSWORD=restic_password
volumes:
- "sites:/home/frappe/frappe-bench/sites"
networks:
- erpnext-network
networks:
erpnext-network:
external: true
name: ${PROJECT_NAME:-erpnext}_default
volumes:
sites:
external: true
name: ${PROJECT_NAME:-erpnext}_sites
```
In case of single docker host setup, add crontab entry for backup every 6 hours.
```
0 */6 * * * /usr/local/bin/docker-compose -f /path/to/backup-job.yml up -d > /dev/null
```
Or
```
0 */6 * * * docker compose -p erpnext exec backend bench --site all backup --with-files > /dev/null
```
Notes:
- Make sure `docker-compose` or `docker compose` is available in path during execution.
- Change the cron string as per need.
- Set the correct project name in place of `erpnext`.
- For Docker Swarm add it as a [swarm-cronjob](https://github.com/crazy-max/swarm-cronjob)
- Add it as a `CronJob` in case of Kubernetes cluster.

View File

@@ -0,0 +1,16 @@
Add the following configuration to `launch.json` `configurations` array to start bench console and use debugger. Replace `development.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", "development.localhost", "console"],
"pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python",
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
}
```

View File

@@ -0,0 +1,16 @@
Clone the version-10 branch of this repo
```shell
git clone https://github.com/frappe/frappe_docker.git -b version-10 && cd frappe_docker
```
Build the images
```shell
export DOCKER_REGISTRY_PREFIX=frappe
docker build -t ${DOCKER_REGISTRY_PREFIX}/frappe-socketio:v10 -f build/frappe-socketio/Dockerfile .
docker build -t ${DOCKER_REGISTRY_PREFIX}/frappe-nginx:v10 -f build/frappe-nginx/Dockerfile .
docker build -t ${DOCKER_REGISTRY_PREFIX}/erpnext-nginx:v10 -f build/erpnext-nginx/Dockerfile .
docker build -t ${DOCKER_REGISTRY_PREFIX}/frappe-worker:v10 -f build/frappe-worker/Dockerfile .
docker build -t ${DOCKER_REGISTRY_PREFIX}/erpnext-worker:v10 -f build/erpnext-worker/Dockerfile .
```

View File

@@ -0,0 +1,13 @@
Add following to frappe container from the `.devcontainer/docker-compose.yml`:
```yaml
...
frappe:
...
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`.

View File

@@ -0,0 +1,47 @@
The purpose of this document is to give you an overview of how the Frappe Docker containers are structured.
# 🐳 Images
There are **four predefined Dockerfiles** available in the `/images` directory.
| Dockerfile | Ingredients | Purpose & Use Case |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **bench** | Sets up only the Bench CLI. | Used for **development** or debugging. Provides the command-line tooling but does not include runtime services. |
| **custom** | Multi-purpose Python backend built from a plain Python image. Includes everything needed to run a Frappe instance via a Compose setup. Installs apps defined in `apps.json`. | Suitable for **production** and **testing**. Ideal when you need control over dependencies (e.g. trying new Python or Node versions). |
| **layered** | Final contents are the same as `custom`, but it is based on **prebuilt images from [Docker Hub](https://hub.docker.com/u/frappe)**. | Great for **production builds** when youre fine with the dependency versions managed by Frappe. Builds much faster since the base layers are already prepared. |
| **production** | Similar to `custom` (built from a Python base image), but installs **only Frappe and ERPNext**. Not customizable with `apps.json`. | Best for **quick starts** or exploration. For real deployments or CI/CD pipelines, `custom` or `layered` are preferred because they offer more flexibility. |
---
These images include everything needed to run all processes required by the Frappe framework
(see [Bench Procfile reference](https://frappeframework.com/docs/v14/user/en/bench/resources/bench-procfile)).
- The `bench` image only sets up the CLI tool.
- The other images (`custom`, `layered`, and `production`) go further — enabling a nearly **plug-and-play** setup for ERPNext and custom apps.
> We use [multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/) and [Docker Buildx](https://docs.docker.com/engine/reference/commandline/buildx/) to maximize layer reuse and make our builds more efficient.
# 🏗️ Compose
Once images are built, containers are orchestrated using a [compose file](https://docs.docker.com/compose/compose-file/). The main compose.yaml provides core services, networking, and volumes for any Frappe setup.
## 🛠️ Services
| Service | Role | Purpose |
| ---------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **configurator** | Setup | Updates `common_site_config.json` so Frappe knows how to access db and redis. It is executed on every `docker-compose up` (and exited immediately). Other services start after this container exits successfully |
| **backend** | Runtime | [Werkzeug server](https://werkzeug.palletsprojects.com/en/2.0.x/) |
| **frontend** | Proxy | [nginx](https://www.nginx.com) server that serves JS/CSS assets and routes incoming requests |
| **websocket** | Real-time | Node server that runs [Socket.IO](https://socket.io) |
| **queue-\_** | Background Jobs | Python servers that run job queues using [rq](https://python-rq.org) |
| **scheduler** | Task Automation | Python server that runs tasks on schedule using [schedule](https://schedule.readthedocs.io/en/stable/) |
## 🧩 Overrides
Additional functionality can be added using [overrides](https://docs.docker.com/compose/extends/). These files modify existing services or add new ones without changing the main `compose.yaml`.
Example: The main compose file has no database service, but `compose.mariadb.yaml` adds MariaDB. See [overrider.md](overrider.md) for the complete list of available overrides and how to use them.
---
**Next:** [Build Setup →](02-build-setup.md)

View File

@@ -0,0 +1,121 @@
This guide walks you through building Frappe images from the repository resources.
# Prerequisites
- git
- docker or podman
- docker compose v2 or podman compose
> Install containerization software according to the official maintainer documentation. Avoid package managers when not recommended, as they frequently cause compatibility issues.
# Clone this repo
```bash
git clone https://github.com/frappe/frappe_docker
cd frappe_docker
```
# Define custom apps
If you dont want to install specific apps to the image skip this section.
To include custom apps in your image, create an `apps.json` file in the repository root:
```json
[
{
"url": "https://github.com/frappe/erpnext",
"branch": "version-15"
},
{
"url": "https://github.com/frappe/hrms",
"branch": "version-15"
},
{
"url": "https://github.com/frappe/helpdesk",
"branch": "main"
}
]
```
Then generate a base64-encoded string from this file:
```bash
export APPS_JSON_BASE64=$(base64 -w 0 apps.json)
```
# Build the image
Choose the appropriate build command based on your container runtime and desired image type. This example builds the `layered` image with the custom `apps.json` you created.
`Docker`:
```bash
docker build \
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
--build-arg=FRAPPE_BRANCH=version-15 \
--build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
--tag=custom:15 \
--file=images/layered/Containerfile .
```
`Podman`:
```bash
podman build \
--build-arg=FRAPPE_PATH=https://github.com/frappe/frappe \
--build-arg=FRAPPE_BRANCH=version-15 \
--build-arg=APPS_JSON_BASE64=$APPS_JSON_BASE64 \
--tag=custom:15 \
--file=images/layered/Containerfile .
```
## Build args
| Arg | Purpose |
| -------------------- | --------------------------------------------------------------------------------------------- |
| **Frappe Framework** | |
| FRAPPE_PATH | Repository URL for Frappe framework source code. Defaults to https://github.com/frappe/frappe |
| FRAPPE_BRANCH | Branch to use for Frappe framework. Defaults to version-15 |
| **Custom Apps** | |
| APPS_JSON_BASE64 | Base64-encoded JSON string from apps.json defining apps to install |
| **Dependencies** | |
| PYTHON_VERSION | Python version for the base image |
| NODE_VERSION | Node.js version |
| WKHTMLTOPDF_VERSION | wkhtmltopdf version |
| **bench only** | |
| DEBIAN_BASE | Debian base version for the bench image, defaults to `bookworm` |
| WKHTMLTOPDF_DISTRO | use the specified distro for debian package. Default is `bookworm` |
# env file
The compose file requires several environment variables. You can either export them on your system or create a `.env` file.
```bash
cp example.env custom.env
```
Edit `custom.env` to customize variables for your setup. The template includes common variables, but you can add, modify, or remove any as needed. See [env-variables.md](env-variables.md) for detailed descriptions of all available variables.
# Creating the final compose file
Combine the base compose file with appropriate overrides for your use case. This example adds MariaDB, Redis, and exposes ports on `:8080`:
```bash
docker compose --env.file example.env \
-f compose.yaml \
-f overrides/compose.mariadb.yaml \
-f overrides/compose.redis.yaml \
-f overrides/compose.noproxy.yaml \
config > compose.custom.yaml
```
This generates `compose.custom.yaml`, which you'll use to start all containers. Customize the overrides and environment variables according to your requirements.
> **NOTE**: podman compose is just a wrapper, it uses docker-compose if it is available or podman-compose if not. podman-compose have an issue reading .env files ([Issue](https://github.com/containers/podman-compose/issues/475)) and might create an issue when running the containers.
---
**Next:** [Start Setup →](03-start-setup.md)
**Back:** [Container Overview ←](01-overview.md)

View File

@@ -0,0 +1,42 @@
# start Container
Once your compose file is ready, start all containers with a single command:
```bash
docker compose -p frappe -f compose.custom.yaml up -d
```
```bash
podman-compose --in-pod=1 --project-name frappe -f compose.custom.yaml up -d
```
The `-p` (or `--project-name`) flag names the project `frappe`, allowing you to easily reference and manage all containers together.
# Create a site and install apps
Frappe is now running, but it's not yet configured. You need to create a site and install your apps.
```bash
docker compose -p frappe exec backend bench new-site <sitename> --mariadb-user-host-login-scope='172.%.%.%'
docker compose -p frappe exec backend bench --site <sitename> install-app erpnext
```
```bash
podman exec -ti erpnext_backend_1 /bin/bash
bench new-site <sitename> --mariadb-user-host-login-scope='172.%.%.%'
bench --site <sitename> install-app erpnext
```
Replace `<sitename>` with your desired site name.
> ## Understanding the MariaDB User Scope
>
> The flag --mariadb-user-host-login-scope='172.%.%.%' allows database connections from any IP address within the 172.0.0.0/8 range. This includes all containers and virtual machines running on your machine.
>
> **Why is this necessary?** Docker and Podman assign dynamic IP addresses to containers. If you set a fixed IP address instead, database connections will fail when the container restarts and receives a new IP. The wildcard pattern ensures connections always work, regardless of IP changes.
>
> **Security note:** This scope is sufficient because only the backend container accesses the database. If you need external database access, adjust the scope accordingly, but be cautious with overly permissive settings.
---
**Back:** [Build Setup →](02-build-setup.md)

View File

@@ -0,0 +1,112 @@
# Environment Variables Reference
Environment variables configure your Frappe Docker setup. They can be set directly in the container or defined in a `.env` file referenced by Docker Compose.
**Getting Started:**
```bash
cp example.env .env
```
Then edit `.env` and set variables according to your needs.
---
## Required Variables
| Variable | Purpose | Example | Notes |
| ----------------- | ------------------------------------------------ | -------------------------------- | ---------------------------------------------------------------- |
| `FRAPPE_PATH` | Frappe framework path | https://github.com/frappe/frappe | |
| `FRAPPE_BRANCH` | Frappe Branch | `version-15` | See [Frappe releases](https://github.com/frappe/frappe/releases) |
| `ERPNEXT_VERSION` | ERPNext release version | `v15.67.0` | Required although its never used |
| `DB_PASSWORD` | Password for database root (MariaDB or Postgres) | `secure_password_123` | Not needed if using `DB_PASSWORD_SECRETS_FILE` |
---
## Database Configuration
| Variable | Purpose | Default | When to Set |
| -------------------------- | ----------------------------------------- | ------------------------------------ | ---------------------------------- |
| `DB_PASSWORD` | Database root user password | 123 | Always (unless using secrets file) |
| `DB_PASSWORD_SECRETS_FILE` | Path to file containing database password | — | Setup mariadb-secrets overrider |
| `DB_HOST` | Database hostname or IP | `db` (service name) | Only if using external database |
| `DB_PORT` | Database port | `3306` (MariaDB) / `5432` (Postgres) | Only if using external database |
---
## Redis Configuration
| Variable | Purpose | Default | When to Set |
| ------------- | --------------------------------------------------- | ---------------------------- | ------------------------------------- |
| `REDIS_CACHE` | Redis hostname for caching | `redis-cache` (service name) | Only if using external Redis instance |
| `REDIS_QUEUE` | Redis hostname for job queues and real-time updates | `redis-queue` (service name) | Only if using external Redis instance |
---
## HTTPS & SSL Configuration
| Variable | Purpose | Default | When to Set |
| ------------------- | ------------------------------------------------ | ------- | ---------------------------------------- |
| `LETSENCRYPT_EMAIL` | Email for Let's Encrypt certificate registration | — | Required if using HTTPS override |
| `SITES` | List of domains for SSL certificates | — | Required if using reverse proxy override |
**Format for `SITES`:**
```bash
# Single site
SITES=`mysite.example.com`
# Wildcard (any subdomain)
SITES=`{any:.+}`
```
---
## Site Configuration
| Variable | Purpose | Default | When to Set |
| ------------------------- | -------------------------------- | ---------------------------------------- | ----------------------------------------------- |
| `FRAPPE_SITE_NAME_HEADER` | Site name for multi-tenant setup | `$host` (resolved from request hostname) | When accessing by IP or need explicit site name |
**Examples:**
If your site is named `mysite` but you want to access it via `127.0.0.1`:
```bash
FRAPPE_SITE_NAME_HEADER=mysite
```
If your site is named `example.com` and you access it via that domain, no need to set this (defaults to hostname).
---
## Image Configuration
| Variable | Purpose | Default | Notes |
| ---------------- | ------------------------------ | --------------------- | ------------------------------------------------------- |
| `CUSTOM_IMAGE` | Custom Docker image repository | Frappe official image | Leave empty to use default |
| `CUSTOM_TAG` | Custom Docker image tag | Latest stable | Corresponds to `FRAPPE_VERSION` |
| `PULL_POLICY` | Image pull behavior | `always` | Options: `always`, `never`, `if-not-present` |
| `RESTART_POLICY` | Container restart behavior | `unless-stopped` | Options: `no`, `always`, `unless-stopped`, `on-failure` |
---
## Nginx Proxy Configuration
| Variable | Purpose | Default | Allowed Values |
| ---------------------- | ---------------------------------- | -------------- | -------------------------------------------- |
| `BACKEND` | Backend service address and port | `0.0.0.0:8000` | `{host}:{port}` |
| `SOCKETIO` | Socket.IO service address and port | `0.0.0.0:9000` | `{host}:{port}` |
| `HTTP_PUBLISH_PORT` | Published HTTP port | `8080` | Any available port |
| `PROXY_READ_TIMEOUT` | Upstream request timeout | `120s` | Any nginx timeout value (e.g., `300s`, `5m`) |
| `CLIENT_MAX_BODY_SIZE` | Maximum upload file size | `50m` | Any nginx size value (e.g., `100m`, `1g`) |
### Real IP Configuration (Behind Proxy)
Use these variables when running behind a reverse proxy or load balancer:
| Variable | Purpose | Default |
| ---------------------------- | ------------------------------------------------- | ----------------- |
| `UPSTREAM_REAL_IP_ADDRESS` | Trusted upstream IP address for real IP detection | `127.0.0.1` |
| `UPSTREAM_REAL_IP_HEADER` | Request header containing client IP | `X-Forwarded-For` |
| `UPSTREAM_REAL_IP_RECURSIVE` | Enable recursive IP search | `off` |

View File

@@ -0,0 +1,27 @@
Overrides extend the base compose.yaml with additional services or modify existing behavior. Include them in your compose command using multiple -f flags.
```bash
docker compose -f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.redis.yaml config > compose.custom.yaml
```
| Overrider | Purpose | Additional Info |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| **Database** | | |
| compose.mariadb.yaml | Adds MariaDB database service | set `DB_PASSWORD` or default Password will be used |
| compose.mariadb-secrets.yaml | Adds MariaDB with password from a secret file instead of environment variable | Set `DB_PASSWORD_SECRETS_FILE` to the path of your secret file |
| compose.mariadb-shared.yaml | Makes MariaDB available on a shared network (mariadb-network) for other services | set `DB_PASSWORD` |
| compose.postgres.yaml | Uses PostgreSQL instead of MariaDB as the database | set `DB_PASSWORD` |
| **Proxy** | | |
| compose.noproxy.yaml | Exposes the application directly on port `:8080` without a reverse proxy | |
| compose.proxy.yaml | Uses Traefik as HTTP reverse proxy on port `:80` | You can change the published port by setting `HTTP_PUBLISH_PORT` |
| compose.https.yaml | Uses Traefik as HTTPS reverse proxy on Port `:443` with automatic HTTP-to-HTTPS redirect | `SITES` and `LETSENCRYPT_EMAIL` must be set. `HTTP_PUBLISH_PORT` and `HTTPS_PUBLISH_PORT` can be set. |
| **Redis** | | |
| compose.redis.yaml | Adds Redis service for caching and background job queuing |
| **TBD** | **The following overrides are available but lack documentation. If you use them and understand their purpose, please consider contributing to this documentation.** |
| compose.backup-cron.yaml | | |
| compose.custom-domain-ssl.yaml | | |
| compose.custom-domain.yaml | | |
| compose.multi-bench-ssl.yaml | | |
| compose.multi-bench.yaml | | |
| compose.traefik-ssl.yaml | | |
| compose.traefik.yaml | | |

View File

@@ -1,58 +0,0 @@
# Custom apps
To add your own Frappe/ERPNext apps to the image, we'll need to create a custom image with the help of a unique wrapper script
> For the sake of simplicity, in this example, we'll be using a place holder called `[custom]`, and we'll be building off the edge image.
Create two directories called `[custom]-worker` and `[custom]-nginx` in the `build` directory.
```shell
cd frappe_docker
mkdir ./build/[custom]-worker ./build/[custom]-nginx
```
Create a `Dockerfile` in `./build/[custom]-worker` with the following content:
```Dockerfile
FROM frappe/erpnext-worker:edge
RUN install_app [custom] https://github.com/[username]/[custom] [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:
```Dockerfile
FROM bitnami/node:12-prod
COPY build/[custom]-nginx/install_app.sh /install_app
RUN /install_app [custom] https://github.com/[username]/[custom] [branch]
FROM frappe/erpnext-nginx:edge
COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/
COPY --from=0 /rsync /rsync
RUN echo -n "\n[custom]" >> /var/www/html/apps.txt
VOLUME [ "/assets" ]
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]
```
Copy over the `install_app.sh` file from `./build/erpnext-nginx`
```shell
cp ./build/erpnext-nginx/install_app.sh ./build/[custom]-nginx
```
Open up `./installation/docker-compose-custom.yml` and replace all instances of `[app]` with the name of your app.
```shell
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]`.

422
docs/development.md Normal file
View File

@@ -0,0 +1,422 @@
# Getting Started
## Prerequisites
In order to start developing you need to satisfy the following prerequisites:
- Docker
- docker-compose
- user added to docker group
It is recommended you allocate at least 4GB of RAM to docker:
- [Instructions for Windows](https://docs.docker.com/docker-for-windows/#resources)
- [Instructions for macOS](https://docs.docker.com/desktop/settings/mac/#advanced)
Here is a screenshot showing the relevant setting in the Help Manual
![image](images/Docker%20Manual%20Screenshot%20-%20Resources%20section.png)
Here is a screenshot showing the settings in Docker Desktop on Mac
![images](images/Docker%20Desktop%20Screenshot%20-%20Resources%20section.png)
## Bootstrap Containers for development
Clone and change directory to frappe_docker directory
```shell
git clone https://github.com/frappe/frappe_docker.git
cd frappe_docker
```
Copy example devcontainer config from `devcontainer-example` to `.devcontainer`
```shell
cp -R devcontainer-example .devcontainer
```
Copy example vscode config for devcontainer from `development/vscode-example` to `development/.vscode`. This will setup basic configuration for debugging.
```shell
cp -R development/vscode-example development/.vscode
```
## Use VSCode Remote Containers extension
For most people getting started with Frappe development, the best solution is to use [VSCode Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
Before opening the folder in container, determine the database that you want to use. The default is MariaDB.
If you want to use PostgreSQL instead, edit `.devcontainer/docker-compose.yml` and uncomment the section for `postgresql` service, and you may also want to comment `mariadb` as well.
VSCode should automatically inquire you to install the required extensions, that can also be installed manually as follows:
- Install Dev Containers for VSCode
- through command line `code --install-extension ms-vscode-remote.remote-containers`
- clicking on the Install button in the Vistual Studio Marketplace: [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
- View: Extensions command in VSCode (Windows: Ctrl+Shift+X; macOS: Cmd+Shift+X) then search for extension `ms-vscode-remote.remote-containers`
After the extensions are installed, you can:
- Open frappe_docker folder in VS Code.
- `code .`
- Launch the command, from Command Palette (Ctrl + Shift + P) `Dev Containers: Reopen in Container`. You can also click in the bottom left corner to access the remote container menu.
Notes:
- The `development` directory is ignored by git. It is mounted and available inside the container. Create all your benches (installations of bench, the tool that manages frappe) inside this directory.
- Node v14 and v10 are installed. Check with `nvm ls`. Node v14 is used by default.
### Setup first bench
> Jump to [scripts](#setup-bench--new-site-using-script) section to setup a bench automatically. Alternatively, you can setup a bench manually using below guide.
Run the following commands in the terminal inside the container. You might need to create a new terminal in VSCode.
NOTE: Prior to doing the following, make sure the user is **frappe**.
```shell
bench init --skip-redis-config-generation frappe-bench
cd frappe-bench
```
To setup frappe framework version 14 bench set `PYENV_VERSION` environment variable to `3.10.5` (default) and use NodeJS version 16 (default),
```shell
# Use default environments
bench init --skip-redis-config-generation --frappe-branch version-14 frappe-bench
# Or set environment versions explicitly
nvm use v16
PYENV_VERSION=3.10.13 bench init --skip-redis-config-generation --frappe-branch version-14 frappe-bench
# Switch directory
cd frappe-bench
```
To setup frappe framework version 13 bench set `PYENV_VERSION` environment variable to `3.9.17` and use NodeJS version 14,
```shell
nvm use v14
PYENV_VERSION=3.9.17 bench init --skip-redis-config-generation --frappe-branch version-13 frappe-bench
cd frappe-bench
```
### Setup hosts
We need to tell bench to use the right containers instead of localhost. Run the following commands inside the container:
```shell
bench set-config -g db_host mariadb
bench set-config -g redis_cache redis://redis-cache:6379
bench set-config -g redis_queue redis://redis-queue:6379
bench set-config -g redis_socketio redis://redis-queue:6379
```
For any reason the above commands fail, set the values in `common_site_config.json` manually.
```json
{
"db_host": "mariadb",
"redis_cache": "redis://redis-cache:6379",
"redis_queue": "redis://redis-queue:6379",
"redis_socketio": "redis://redis-queue:6379"
}
```
### Edit Honcho's Procfile
Note : With the option '--skip-redis-config-generation' during bench init, these actions are no more needed. But at least, take a look to ProcFile to see what going on when bench launch honcho on start command
Honcho is the tool used by Bench to manage all the processes Frappe requires. Usually, these all run in localhost, but in this case, we have external containers for Redis. For this reason, we have to stop Honcho from trying to start Redis processes.
Honcho is installed in global python environment along with bench. To make it available locally you've to install it in every `frappe-bench/env` you create. Install it using command `./env/bin/pip install honcho`. It is required locally if you wish to use is as part of VSCode launch configuration.
Open the Procfile file and remove the three lines containing the configuration from Redis, either by editing manually the file:
```shell
code Procfile
```
Or running the following command:
```shell
sed -i '/redis/d' ./Procfile
```
### Create a new site with bench
You can create a new site with the following command:
```shell
bench new-site --mariadb-user-host-login-scope=% sitename
```
sitename MUST end with .localhost for trying deployments locally.
for example:
```shell
bench new-site --mariadb-user-host-login-scope=% development.localhost
```
The same command can be run non-interactively as well:
```shell
bench new-site --db-root-password 123 --admin-password admin --mariadb-user-host-login-scope=% development.localhost
```
The command will ask the MariaDB root password. The default root password is `123`.
This will create a new site and a `development.localhost` directory under `frappe-bench/sites`.
The option `--mariadb-user-host-login-scope=%` will configure site's database credentials to work with docker.
You may need to configure your system /etc/hosts if you're on Linux, Mac, or its Windows equivalent.
To setup site with PostgreSQL as database use option `--db-type postgres` and `--db-host postgresql`. (Available only v12 onwards, currently NOT available for ERPNext).
Example:
```shell
bench new-site --db-type postgres --db-host postgresql mypgsql.localhost
```
To avoid entering postgresql username and root password, set it in `common_site_config.json`,
```shell
bench config set-common-config -c root_login postgres
bench config set-common-config -c root_password '"123"'
```
Note: If PostgreSQL is not required, the postgresql service / container can be stopped.
### Set bench developer mode on the new site
To develop a new app, the last step will be setting the site into developer mode. Documentation is available at [this link](https://frappe.io/docs/user/en/guides/app-development/how-enable-developer-mode-in-frappe).
```shell
bench --site development.localhost set-config developer_mode 1
bench --site development.localhost clear-cache
```
### Install an app
To install an app we need to fetch it from the appropriate git repo, then install in on the appropriate site:
You can check [VSCode container remote extension documentation](https://code.visualstudio.com/docs/remote/containers#_sharing-git-credentials-with-your-container) regarding git credential sharing.
To install custom app
```shell
# --branch is optional, use it to point to branch on custom app repository
bench get-app --branch version-12 https://github.com/myusername/myapp
bench --site development.localhost install-app myapp
```
At the time of this writing, the Payments app has been factored out of the Version 14 ERPNext app and is now a separate app. ERPNext will not install it.
```shell
bench get-app --branch version-14 --resolve-deps erpnext
bench --site development.localhost install-app erpnext
```
To install ERPNext (from the version-13 branch):
```shell
bench get-app --branch version-13 erpnext
bench --site development.localhost install-app erpnext
```
Note: Both frappe and erpnext must be on branch with same name. e.g. version-14
You can use the `switch-to-branch` command to align versions if you get an error about mismatching versions.
```shell
bench switch-to-branch version-xx
```
### Start Frappe without debugging
Execute following command from the `frappe-bench` directory.
```shell
bench start
```
You can now login with user `Administrator` and the password you choose when creating the site.
Your website will now be accessible at location [development.localhost:8000](http://development.localhost:8000)
Note: To start bench with debugger refer section for debugging.
### Setup bench / new site using script
Most developers work with numerous clients and versions. Moreover, apps may be required to be installed by everyone on the team working for a client.
This is simplified using a script to automate the process of creating a new bench / site and installing the required apps. The `Administrator` password for created sites is `admin`.
Sample `apps-example.json` is used by default, it installs erpnext on current stable release. To install custom apps, copy the `apps-example.json` to custom json file and make changes to list of apps. Pass this file to the `installer.py` script.
> You may have apps in private repos which may require ssh access. You may use SSH from your home directory on linux (configurable in docker-compose.yml).
```shell
python installer.py #pass --db-type postgres for postgresdb
```
For command help
```shell
python installer.py --help
usage: installer.py [-h] [-j APPS_JSON] [-b BENCH_NAME] [-s SITE_NAME] [-r FRAPPE_REPO] [-t FRAPPE_BRANCH] [-p PY_VERSION] [-n NODE_VERSION] [-v] [-a ADMIN_PASSWORD] [-d DB_TYPE]
options:
-h, --help show this help message and exit
-j APPS_JSON, --apps-json APPS_JSON
Path to apps.json, default: apps-example.json
-b BENCH_NAME, --bench-name BENCH_NAME
Bench directory name, default: frappe-bench
-s SITE_NAME, --site-name SITE_NAME
Site name, should end with .localhost, default: development.localhost
-r FRAPPE_REPO, --frappe-repo FRAPPE_REPO
frappe repo to use, default: https://github.com/frappe/frappe
-t FRAPPE_BRANCH, --frappe-branch FRAPPE_BRANCH
frappe repo to use, default: version-15
-p PY_VERSION, --py-version PY_VERSION
python version, default: Not Set
-n NODE_VERSION, --node-version NODE_VERSION
node version, default: Not Set
-v, --verbose verbose output
-a ADMIN_PASSWORD, --admin-password ADMIN_PASSWORD
admin password for site, default: admin
-d DB_TYPE, --db-type DB_TYPE
Database type to use (e.g., mariadb or postgres)
```
A new bench and / or site is created for the client with following defaults.
- MariaDB root password: `123`
- Admin password: `admin`
> To use Postegres DB, comment the mariabdb service and uncomment postegres service.
### Start Frappe with Visual Studio Code Python Debugging
To enable Python debugging inside Visual Studio Code, you must first install the `ms-python.python` extension inside the container. This should have already happened automatically, but depending on your VSCode config, you can force it by:
- Click on the extension icon inside VSCode
- Search `ms-python.python`
- Click on `Install on Dev Container: Frappe Bench`
- Click on 'Reload'
We need to start bench separately through the VSCode debugger. For this reason, **instead** of running `bench start` you should run the following command inside the frappe-bench directory:
```shell
honcho start \
socketio \
watch \
schedule \
worker_short \
worker_long
```
Alternatively you can use the VSCode launch configuration "Honcho SocketIO Watch Schedule Worker" which launches the same command as above.
This command starts all processes with the exception of Redis (which is already running in separate container) and the `web` process. The latter can can finally be started from the debugger tab of VSCode by clicking on the "play" button.
You can now login with user `Administrator` and the password you choose when creating the site, if you followed this guide's unattended install that password is going to be `admin`.
To debug workers, skip starting worker with honcho and start it with VSCode debugger.
For advance vscode configuration in the devcontainer, change the config files in `development/.vscode`.
## Developing using the interactive console
You can launch a simple interactive shell console in the terminal with:
```shell
bench --site development.localhost console
```
More likely, you may want to launch VSCode interactive console based on Jupyter kernel.
Launch VSCode command palette (cmd+shift+p or ctrl+shift+p), run the command `Python: Select interpreter to start Jupyter server` and select `/workspace/development/frappe-bench/env/bin/python`.
The first step is installing and updating the required software. Usually the frappe framework may require an older version of Jupyter, while VSCode likes to move fast, this can [cause issues](https://github.com/jupyter/jupyter_console/issues/158). For this reason we need to run the following command.
```shell
/workspace/development/frappe-bench/env/bin/python -m pip install --upgrade jupyter ipykernel ipython
```
Then, run the command `Python: Show Python interactive window` from the VSCode command palette.
Replace `development.localhost` with your site and run the following code in a Jupyter cell:
```python
import frappe
frappe.init(site='development.localhost', sites_path='/workspace/development/frappe-bench/sites')
frappe.connect()
frappe.local.lang = frappe.db.get_default('lang')
frappe.db.connect()
```
The first command can take a few seconds to be executed, this is to be expected.
## Manually start containers
In case you don't use VSCode, you may start the containers manually with the following command:
### Running the containers
```shell
docker-compose -f .devcontainer/docker-compose.yml up -d
```
And enter the interactive shell for the development container with the following command:
```shell
docker exec -e "TERM=xterm-256color" -w /workspace/development -it devcontainer-frappe-1 bash
```
## Use additional services during development
Add any service that is needed for development in the `.devcontainer/docker-compose.yml` then rebuild and reopen in devcontainer.
e.g.
```yaml
...
services:
...
postgresql:
image: postgres:11.8
environment:
POSTGRES_PASSWORD: 123
volumes:
- postgresql-data:/var/lib/postgresql/data
ports:
- 5432:5432
volumes:
...
postgresql-data:
```
Access the service by service name from the `frappe` development container. The above service will be accessible via hostname `postgresql`. If ports are published on to host, access it via `localhost:5432`.
## Using Cypress UI tests
To run cypress based UI tests in a docker environment, follow the below steps:
1. Install and setup X11 tooling on VM using the script `install_x11_deps.sh`
```shell
sudo bash ./install_x11_deps.sh
```
This script will install required deps, enable X11Forwarding and restart SSH daemon and export `DISPLAY` variable.
2. Run X11 service `startx` or `xquartz`
3. Start docker compose services.
4. SSH into ui-tester service using `docker exec..` command
5. Export CYPRESS_baseUrl and other required env variables
6. Start Cypress UI console by issuing `cypress run command`
> More references : [Cypress Official Documentation](https://www.cypress.io/blog/2019/05/02/run-cypress-with-a-single-docker-command)
> Ensure DISPLAY environment is always exported.
## Using Mailpit to test mail services
To use Mailpit just uncomment the service in the docker-compose.yml file.
The Interface is then available under port 8025 and the smtp service can be used as mailpit:1025.

View File

@@ -1,295 +0,0 @@
### Prerequisites
IMPORTANT: All commands are executed on live server with public IP and DNS Configured.
#### Setup docker swarm
Follow [dockerswarm.rocks](https://dockerswarm.rocks) guide to setup Docker swarm, Traefik and Portainer.
Use Portainer for rest of the guide
### Create Config
Configs > Add Config > `frappe-mariadb-config`
```
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
```
### Create Secret
Secret > Add Secret > `frappe-mariadb-root-password`
```
longsecretpassword
```
Note down this password.
It is only available in mariadb containers at location `/run/secrets/frappe-mariadb-root-password` later
### Deploy MariaDB Replication
Stacks > Add Stacks > `frappe-mariadb`
```yaml
version: "3.7"
services:
mariadb-master:
image: 'bitnami/mariadb:10.3'
deploy:
restart_policy:
condition: on-failure
configs:
- source: frappe-mariadb-config
target: /opt/bitnami/mariadb/conf/bitnami/my_custom.cnf
networks:
- frappe-network
secrets:
- frappe-mariadb-root-password
volumes:
- 'mariadb_master_data:/bitnami/mariadb'
environment:
- MARIADB_REPLICATION_MODE=master
- MARIADB_REPLICATION_USER=repl_user
- MARIADB_REPLICATION_PASSWORD_FILE=/run/secrets/frappe-mariadb-root-password
- MARIADB_ROOT_PASSWORD_FILE=/run/secrets/frappe-mariadb-root-password
mariadb-slave:
image: 'bitnami/mariadb:10.3'
deploy:
restart_policy:
condition: on-failure
configs:
- source: frappe-mariadb-config
target: /opt/bitnami/mariadb/conf/bitnami/my_custom.cnf
networks:
- frappe-network
secrets:
- frappe-mariadb-root-password
volumes:
- 'mariadb_slave_data:/bitnami/mariadb'
environment:
- MARIADB_REPLICATION_MODE=slave
- MARIADB_REPLICATION_USER=repl_user
- MARIADB_REPLICATION_PASSWORD_FILE=/run/secrets/frappe-mariadb-root-password
- MARIADB_MASTER_HOST=mariadb-master
- MARIADB_MASTER_PORT_NUMBER=3306
- MARIADB_MASTER_ROOT_PASSWORD_FILE=/run/secrets/frappe-mariadb-root-password
volumes:
mariadb_master_data:
mariadb_slave_data:
configs:
frappe-mariadb-config:
external: true
secrets:
frappe-mariadb-root-password:
external: true
networks:
frappe-network:
name: frappe-network
attachable: true
```
### Deploy Frappe/ERPNext
Stacks > Add Stacks > `frappe-bench-v13`
```yaml
version: "3.7"
services:
redis-cache:
image: redis:latest
volumes:
- redis-cache-vol:/data
deploy:
restart_policy:
condition: on-failure
networks:
- frappe-network
redis-queue:
image: redis:latest
volumes:
- redis-queue-vol:/data
deploy:
restart_policy:
condition: on-failure
networks:
- frappe-network
redis-socketio:
image: redis:latest
volumes:
- redis-socketio-vol:/data
deploy:
restart_policy:
condition: on-failure
networks:
- frappe-network
erpnext-nginx:
image: frappe/erpnext-nginx:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set}
environment:
- UPSTREAM_REAL_IP_ADDRESS=10.0.0.0/8
- FRAPPE_PY=erpnext-python
- FRAPPE_PY_PORT=8000
- FRAPPE_SOCKETIO=frappe-socketio
- SOCKETIO_PORT=9000
volumes:
- sites-vol:/var/www/html/sites:rw
- assets-vol:/assets:rw
networks:
- frappe-network
- traefik-public
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.docker.network=traefik-public"
- "traefik.enable=true"
- "traefik.constraint-label=traefik-public"
- "traefik.http.routers.erpnext-nginx.rule=Host(${SITES?Variable SITES not set})"
- "traefik.http.routers.erpnext-nginx.entrypoints=http"
- "traefik.http.routers.erpnext-nginx.middlewares=https-redirect"
- "traefik.http.routers.erpnext-nginx-https.rule=Host(${SITES?Variable SITES not set})"
- "traefik.http.routers.erpnext-nginx-https.entrypoints=https"
- "traefik.http.routers.erpnext-nginx-https.tls=true"
- "traefik.http.routers.erpnext-nginx-https.tls.certresolver=le"
- "traefik.http.services.erpnext-nginx.loadbalancer.server.port=80"
erpnext-python:
image: frappe/erpnext-worker:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set}
deploy:
restart_policy:
condition: on-failure
environment:
- MARIADB_HOST=${MARIADB_HOST?Variable MARIADB_HOST not set}
- REDIS_CACHE=redis-cache:6379
- REDIS_QUEUE=redis-queue:6379
- REDIS_SOCKETIO=redis-socketio:6379
- SOCKETIO_PORT=9000
- AUTO_MIGRATE=1
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- assets-vol:/home/frappe/frappe-bench/sites/assets:rw
networks:
- frappe-network
frappe-socketio:
image: frappe/frappe-socketio:${FRAPPE_VERSION?Variable FRAPPE_VERSION not set}
deploy:
restart_policy:
condition: on-failure
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- frappe-network
erpnext-worker-default:
image: frappe/erpnext-worker:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set}
deploy:
restart_policy:
condition: on-failure
command: worker
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- frappe-network
erpnext-worker-short:
image: frappe/erpnext-worker:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set}
deploy:
restart_policy:
condition: on-failure
command: worker
environment:
- WORKER_TYPE=short
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- frappe-network
erpnext-worker-long:
image: frappe/erpnext-worker:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set}
deploy:
restart_policy:
condition: on-failure
command: worker
environment:
- WORKER_TYPE=long
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- frappe-network
frappe-schedule:
image: frappe/erpnext-worker:${ERPNEXT_VERSION?Variable ERPNEXT_VERSION not set}
deploy:
restart_policy:
condition: on-failure
command: schedule
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- frappe-network
volumes:
redis-cache-vol:
redis-queue-vol:
redis-socketio-vol:
assets-vol:
sites-vol:
networks:
traefik-public:
external: true
frappe-network:
external: true
```
Use environment variables:
- `ERPNEXT_VERSION` variable to be set to desired version of ERPNext. e.g. 12.10.0
- `FRAPPE_VERSION` variable to be set to desired version of Frappe Framework. e.g. 12.7.0
- `MARIADB_HOST=frappe-mariadb_mariadb-master`
- `SITES` variable is list of sites in back tick and separated by comma
```
SITES=`site1.example.com`,`site2.example.com`
```
### Create new site job
1. Containers > Add Container > `add-site1-example-com`
2. Select Image frappe/erpnext-worker:v13
3. Set command as `new`
4. Select network `frappe-network`
5. Select Volume `frappe-bench-v13_sites_vol` and mount in container `/home/frappe/frappe-bench/sites`
6. Env variables:
- MYSQL_ROOT_PASSWORD=longsecretpassword
- SITE_NAME=site1.example.com
- INSTALL_APPS=erpnext
7. Start container
### Migrate Sites job
1. Containers > Add Container > `migrate-sites`
2. Select Image frappe/erpnext-worker:v13
3. Set command as `migrate`
4. Select network `frappe-network`
5. Select Volume `frappe-bench-v13_sites_vol` and mount in container `/home/frappe/frappe-bench/sites`
6. Env variables:
- MAINTENANCE_MODE=1
7. Start container

View File

@@ -1,33 +0,0 @@
List of environment variables for containers
### frappe-worker and erpnext-worker
Following environment variables are set into sites volume as `common_site_config.json`. It means once the file is created in volume, the variables won't have any effect, you need to edit the common_site_config.json to update the configuration
- `DB_HOST`: MariaDB host, domain name or ip address.
- `DB_PORT`: MariaDB port.
- `REDIS_CACHE`: Redis cache host, domain name or ip address.
- `REDIS_QUEUE`: Redis queue host, domain name or ip address.
- `REDIS_SOCKETIO`: Redis queue host, domain name or ip address.
- `SOCKETIO_PORT: `: Port on which the SocketIO should start.
- `WORKER_CLASS`: Optionally set gunicorn worker-class. Supports gevent only, defaults to gthread.
### frappe-nginx and erpnext-nginx
These variables are set on every container start. Change in these variables will reflect on every container start.
- `FRAPPE_PY`: Gunicorn host to reverse proxy. Default: 0.0.0.0
- `FRAPPE_PY_PORT`: Gunicorn port to reverse proxy. Default: 8000
- `FRAPPE_SOCKETIO`: SocketIO host to reverse proxy. Default: 0.0.0.0
- `SOCKETIO_PORT`: SocketIO port to reverse proxy. Default: 9000
- `HTTP_TIMEOUT`: Nginx http timeout. Default: 120
- `UPSTREAM_REAL_IP_ADDRESS `: The trusted address (or ip range) of upstream proxy servers. If set, this will tell nginx to trust the X-Forwarded-For header from these proxy servers in determining the real IP address of connecting clients. Default: 127.0.0.1
- `UPSTREAM_REAL_IP_RECURSIVE`: When set to `on`, this will tell nginx to not just look to the last upstream proxy server in determining the real IP address. Default: off
- `UPSTREAM_REAL_IP_HEADER`: Set this to the header name sent by your upstream proxy server to indicate the real IP of connecting clients. Default: X-Forwarded-For
- `FRAPPE_SITE_NAME_HEADER`: NGINX `X-Frappe-Site-Name` header in the HTTP request which matches a site name. Default: `$host`
- `HTTP_HOST`: NGINX `Host` header in the HTTP request which matches a site name. Default: `$http_host`
- `SKIP_NGINX_TEMPLATE_GENERATION`: When set to `1`, this will not generate a default NGINX configuration. The config file must be mounted inside the container (`/etc/nginx/conf.d`) by the user in this case. Default: `0`
### frappe-socketio
This container takes configuration from `common_site_config.json` which is already created by erpnext gunicorn container. It doesn't use any environment variables.

View File

@@ -0,0 +1,12 @@
# Resolving Docker `nginx-entrypoint.sh` Script Not Found Error on Windows
If you're encountering the error `exec /usr/local/bin/nginx-entrypoint.sh: no such file or directory` in a Docker container on Windows, follow these steps to resolve the issue.
## 1. Check Line Endings
On Windows, files often have `CRLF` line endings, while Linux systems expect `LF`. This can cause issues when executing shell scripts in Linux containers.
- **Convert Line Endings using `dos2unix`:**
```bash
dos2unix resources/nginx-entrypoint.sh
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -0,0 +1,112 @@
## Migrate from multi-image setup
All the containers now use same image. Use `frappe/erpnext` instead of `frappe/frappe-worker`, `frappe/frappe-nginx` , `frappe/frappe-socketio` , `frappe/erpnext-worker` and `frappe/erpnext-nginx`.
Now you need to specify command and environment variables for following containers:
### Frontend
For `frontend` service to act as static assets frontend and reverse proxy, you need to pass `nginx-entrypoint.sh` as container `command` and `BACKEND` and `SOCKETIO` environment variables pointing `{host}:{port}` for gunicorn and websocket services. Check [environment variables](environment-variables.md)
Now you only need to mount the `sites` volume at location `/home/frappe/frappe-bench/sites`. No need for `assets` volume and asset population script or steps.
Example change:
```yaml
# ... removed for brevity
frontend:
image: frappe/erpnext:${ERPNEXT_VERSION:?ERPNext version not set}
command:
- nginx-entrypoint.sh
environment:
BACKEND: backend:8000
SOCKETIO: websocket:9000
volumes:
- sites:/home/frappe/frappe-bench/sites
# ... removed for brevity
```
### Websocket
For `websocket` service to act as socketio backend, you need to pass `["node", "/home/frappe/frappe-bench/apps/frappe/socketio.js"]` as container `command`
Example change:
```yaml
# ... removed for brevity
websocket:
image: frappe/erpnext:${ERPNEXT_VERSION:?ERPNext version not set}
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
# ... removed for brevity
```
### Configurator
For `configurator` service to act as run once configuration job, you need to pass `["bash", "-c"]` as container `entrypoint` and bash script inline to yaml. There is no `configure.py` in the container now.
Example change:
```yaml
# ... removed for brevity
configurator:
image: frappe/erpnext:${ERPNEXT_VERSION:?ERPNext version not set}
restart: "no"
entrypoint:
- bash
- -c
command:
- >
bench set-config -g db_host $$DB_HOST;
bench set-config -gp db_port $$DB_PORT;
bench set-config -g redis_cache "redis://$$REDIS_CACHE";
bench set-config -g redis_queue "redis://$$REDIS_QUEUE";
bench set-config -gp socketio_port $$SOCKETIO_PORT;
environment:
DB_HOST: db
DB_PORT: "3306"
REDIS_CACHE: redis-cache:6379
REDIS_QUEUE: redis-queue:6379
SOCKETIO_PORT: "9000"
# ... removed for brevity
```
### Site Creation
For `create-site` service to act as run once site creation job, you need to pass `["bash", "-c"]` as container `entrypoint` and bash script inline to yaml. Make sure to use `--mariadb-user-host-login-scope=%` as upstream bench is installed in container.
The `WORKDIR` has changed to `/home/frappe/frappe-bench` like `bench` setup we are used to. So the path to find `common_site_config.json` has changed to `sites/common_site_config.json`.
Example change:
```yaml
# ... removed for brevity
create-site:
image: frappe/erpnext:${ERPNEXT_VERSION:?ERPNext version not set}
restart: "no"
entrypoint:
- bash
- -c
command:
- >
wait-for-it -t 120 db:3306;
wait-for-it -t 120 redis-cache:6379;
wait-for-it -t 120 redis-queue:6379;
export start=`date +%s`;
until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \
[[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \
[[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]];
do
echo "Waiting for sites/common_site_config.json to be created";
sleep 5;
if (( `date +%s`-start > 120 )); then
echo "could not find sites/common_site_config.json with required keys";
exit 1
fi
done;
echo "sites/common_site_config.json found";
bench new-site --mariadb-user-host-login-scope=% --admin-password=admin --db-root-password=admin --install-app erpnext --set-default frontend;
# ... removed for brevity
```

View File

@@ -1,194 +0,0 @@
# Multi bench
This setup separates all services such that only required ones can be deployed.
This is suitable when multiple services are installed on cluster with shared proxy/router, database, cache etc.
Make sure you've cloned this repository and switch to the directory before executing following commands.
## Setup Environment Variables
Copy the example docker environment file to `.env`:
```sh
cp env-example .env
```
To get started, copy the existing `env-example` file to `.env`. By default, the file will contain the following variables:
- `VERSION=edge`
- In this case, `edge` corresponds to `develop`. To setup any other version, you may use the branch name or version specific tags. (eg. v13.0.0, version-12, v11.1.15, v11)
- `MYSQL_ROOT_PASSWORD=admin`
- Bootstraps a MariaDB container with this value set as the root password. If a managed MariaDB instance is used, there is no need to set the password here.
- `MARIADB_HOST=mariadb`
- Sets the hostname to `mariadb`. This is required if the database is managed by the containerized MariaDB instance.
- In case of a separately managed database setups, set the value to the database's hostname/IP/domain.
- `SITES=site1.domain.com,site2.domain.com`
- List of sites that are part of the deployment "bench" Each site is separated by a comma(,).
- If LetsEncrypt is being setup, make sure that the DNS for all the site's domains correctly point to the current instance.
- `LETSENCRYPT_EMAIL=your.email@your.domain.com`
- Email for LetsEncrypt expiry notification. This is only required if you are setting up LetsEncrypt.
Notes:
- docker-compose-erpnext.yml and docker-compose-frappe.yml set `AUTO_MIGRATE` environment variable to `1`.
- `AUTO_MIGRATE` checks if there is semver bump or git hash change in case of develop branch and automatically migrates the sites on container start up.
- It is good practice to use image tag for specific version instead of latest. e.g `frappe-socketio:v12.5.1`, `erpnext-nginx:v12.7.1`.
## Local deployment for testing
For trying out locally or to develop apps using ERPNext REST API port 80 must be published.
Following command will start the needed containers and expose ports.
For Erpnext:
```sh
docker-compose \
--project-name <project-name> \
-f installation/docker-compose-common.yml \
-f installation/docker-compose-erpnext.yml \
-f installation/erpnext-publish.yml \
up -d
```
For Frappe:
```sh
docker-compose \
--project-name <project-name> \
-f installation/docker-compose-common.yml \
-f installation/docker-compose-frappe.yml \
-f installation/frappe-publish.yml \
up -d
```
Make sure to replace `<project-name>` with the desired name you wish to set for the project.
Notes:
- New site (first site) needs to be added after starting the services.
- The local deployment is for testing and REST API development purpose only
- A complete development environment is available [here](../development)
- The site names are limited to patterns matching \*.localhost by default
- Additional site name patterns can be added by editing /etc/hosts of your host machine
## Deployment for production
### Setup Letsencrypt Nginx Proxy Companion
Letsencrypt Nginx Proxy Companion can optionally be setup to provide SSL. This is recommended for instances accessed over the internet.
Your DNS will need to be configured correctly for Letsencrypt to verify your domain.
To setup the proxy companion, run the following commands:
```sh
cd $HOME
git clone https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion.git
cd docker-compose-letsencrypt-nginx-proxy-companion
cp .env.sample .env
./start.sh
```
It will create the required network and configure containers for Letencrypt ACME.
For more details, see the [Letsencrypt Nginx Proxy Companion github repo](https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion). Letsencrypt Nginx Proxy Companion github repo works by automatically proxying to containers with the `VIRTUAL_HOST` environmental variable.
Notes:
- `SITES` variables from `env-example` is set as `VIRTUAL_HOST`
- `LETSENCRYPT_EMAIL` variables from `env-example` is used as it is.
- This is simple nginx + letsencrypt solution. Any other solution can be setup. Above two variables can be re-used or removed in case any other reverse-proxy is used.
### Start Frappe/ERPNext Services
To start the Frappe/ERPNext services for production, run the following command:
```sh
docker-compose \
--project-name <project-name> \
-f installation/docker-compose-common.yml \
-f installation/docker-compose-erpnext.yml \
-f installation/docker-compose-networks.yml \
up -d
```
Make sure to replace `<project-name>` with any desired name you wish to set for the project.
Notes:
- Use `docker-compose-frappe.yml` in case you need only Frappe without ERPNext.
- New site (first site) needs to be added after starting the services.
## Docker containers
This repository contains the following docker-compose files, each one containing the described images:
* docker-compose-common.yml
* redis-cache
* volume: redis-cache-vol
* redis-queue
* volume: redis-queue-vol
* redis-socketio
* volume: redis-socketio-vol
* mariadb: main database
* volume: mariadb-vol
* docker-compose-erpnext.yml
* erpnext-nginx: serves static assets and proxies web request to the appropriate container, allowing to offer all services on the same port.
* volume: assets-vol
* erpnext-python: main application code
* frappe-socketio: enables realtime communication to the user interface through websockets
* frappe-worker-default: background runner
* frappe-worker-short: background runner for short-running jobs
* frappe-worker-long: background runner for long-running jobs
* frappe-schedule
* docker-compose-frappe.yml
* frappe-nginx: serves static assets and proxies web request to the appropriate container, allowing to offer all services on the same port.
* volume: assets-vol, sites-vol
* erpnext-python: main application code
* volume: sites-vol
* frappe-socketio: enables realtime communication to the user interface through websockets
* volume: sites-vol
* frappe-worker-default: background runner
* volume: sites-vol
* frappe-worker-short: background runner for short-running jobs
* volume: sites-vol
* frappe-worker-long: background runner for long-running jobs
* volume: sites-vol
* frappe-schedule
* volume: sites-vol
* docker-compose-networks.yml: this yaml define the network to communicate with *Letsencrypt Nginx Proxy Companion*.
* erpnext-publish.yml: this yml extends erpnext-nginx service to publish port 80, can only be used with docker-compose-erpnext.yml
* frappe-publish.yml: this yml extends frappe-nginx service to publish port 80, can only be used with docker-compose-frappe.yml
## Updating and Migrating Sites
Switch to the root of the `frappe_docker` directory before running the following commands:
```sh
# Update environment variable VERSION
nano .env
# Pull new images
docker-compose \
-f installation/docker-compose-common.yml \
-f installation/docker-compose-erpnext.yml \
pull
# Restart containers
docker-compose \
--project-name <project-name> \
-f installation/docker-compose-common.yml \
-f installation/docker-compose-erpnext.yml \
-f installation/docker-compose-networks.yml \
up -d
docker run \
-e "MAINTENANCE_MODE=1" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
--network <project-name>_default \
frappe/erpnext-worker:$VERSION migrate
```

View File

@@ -0,0 +1,69 @@
WARNING: Do not use this in production if the site is going to be served over plain http.
### Step 1
Remove the traefik service from docker-compose.yml
### Step 2
Add service for each port that needs to be exposed.
e.g. `port-site-1`, `port-site-2`, `port-site-3`.
```yaml
# ... removed for brevity
services:
# ... removed for brevity
port-site-1:
image: frappe/erpnext:v14.11.1
deploy:
restart_policy:
condition: on-failure
command:
- nginx-entrypoint.sh
environment:
BACKEND: backend:8000
FRAPPE_SITE_NAME_HEADER: site1.local
SOCKETIO: websocket:9000
volumes:
- sites:/home/frappe/frappe-bench/sites
ports:
- "8080:8080"
port-site-2:
image: frappe/erpnext:v14.11.1
deploy:
restart_policy:
condition: on-failure
command:
- nginx-entrypoint.sh
environment:
BACKEND: backend:8000
FRAPPE_SITE_NAME_HEADER: site2.local
SOCKETIO: websocket:9000
volumes:
- sites:/home/frappe/frappe-bench/sites
ports:
- "8081:8080"
port-site-3:
image: frappe/erpnext:v14.11.1
deploy:
restart_policy:
condition: on-failure
command:
- nginx-entrypoint.sh
environment:
BACKEND: backend:8000
FRAPPE_SITE_NAME_HEADER: site3.local
SOCKETIO: websocket:9000
volumes:
- sites:/home/frappe/frappe-bench/sites
ports:
- "8082:8080"
```
Notes:
- Above setup will expose `site1.local`, `site2.local`, `site3.local` on port `8080`, `8081`, `8082` respectively.
- Change `site1.local` to site name to serve from bench.
- Change the `BACKEND` and `SOCKETIO` environment variables as per your service names.
- Make sure `sites:` volume is available as part of yaml.

131
docs/setup-options.md Normal file
View File

@@ -0,0 +1,131 @@
# Containerized Production Setup
Make sure you've cloned this repository and switch to the directory before executing following commands.
Commands will generate YAML as per the environment for setup.
## Prerequisites
- [docker](https://docker.com/get-started)
- [docker compose v2](https://docs.docker.com/compose/cli-command)
## Setup Environment Variables
Copy the example docker environment file to `.env`:
```sh
cp example.env .env
```
Note: To know more about environment variable [read here](./environment-variables.md). Set the necessary variables in the `.env` file.
## Generate docker-compose.yml for variety of setups
Notes:
- Make sure to replace `<project-name>` with the desired name you wish to set for the project.
- This setup is not to be used for development. A complete development environment is available [here](../development)
### Store the yaml files
YAML files generated by `docker compose config` command can be stored in a directory. We will create a directory called `gitops` in the user's home.
```shell
mkdir ~/gitops
```
You can make the directory into a private git repo which stores the yaml and secrets. It can help in tracking changes.
Instead of `docker compose config`, you can directly use `docker compose up` to start the containers and skip storing the yamls in `gitops` directory.
### Setup Frappe without proxy and external MariaDB and Redis
In this case make sure you've set `DB_HOST`, `DB_PORT`, `REDIS_CACHE` and `REDIS_QUEUE` environment variables or the `configurator` will fail.
```sh
# Generate YAML
docker compose -f compose.yaml -f overrides/compose.noproxy.yaml config > ~/gitops/docker-compose.yml
# Start containers
docker compose --project-name <project-name> -f ~/gitops/docker-compose.yml up -d
```
### Setup ERPNext with proxy and external MariaDB and Redis
In this case make sure you've set `DB_HOST`, `DB_PORT`, `REDIS_CACHE` and `REDIS_QUEUE` environment variables or the `configurator` will fail.
```sh
# Generate YAML
docker compose -f compose.yaml \
-f overrides/compose.proxy.yaml \
config > ~/gitops/docker-compose.yml
# Start containers
docker compose --project-name <project-name> -f ~/gitops/docker-compose.yml up -d
```
### Setup Frappe using containerized MariaDB and Redis with Letsencrypt certificates.
In this case make sure you've set `LETSENCRYPT_EMAIL` and `SITES` environment variables are set or certificates won't work.
```sh
# Generate YAML
docker compose -f compose.yaml \
-f overrides/compose.mariadb.yaml \
-f overrides/compose.redis.yaml \
-f overrides/compose.https.yaml \
config > ~/gitops/docker-compose.yml
# Start containers
docker compose --project-name <project-name> -f ~/gitops/docker-compose.yml up -d
```
### Setup ERPNext using containerized MariaDB and Redis with Letsencrypt certificates.
In this case make sure you've set `LETSENCRYPT_EMAIL` and `SITES` environment variables are set or certificates won't work.
```sh
# Generate YAML
docker compose -f compose.yaml \
-f overrides/compose.mariadb.yaml \
-f overrides/compose.redis.yaml \
-f overrides/compose.https.yaml \
config > ~/gitops/docker-compose.yml
# Start containers
docker compose --project-name <project-name> -f ~/gitops/docker-compose.yml up -d
```
## Create first site
After starting containers, the first site needs to be created. Refer [site operations](./site-operations.md#setup-new-site).
## Updating Images
Switch to the root of the `frappe_docker` directory before running the following commands:
```sh
# Update environment variables ERPNEXT_VERSION and FRAPPE_VERSION
nano .env
# Pull new images
docker compose -f compose.yaml \
# ... your other overrides
config > ~/gitops/docker-compose.yml
# Pull images
docker compose --project-name <project-name> -f ~/gitops/docker-compose.yml pull
# Stop containers
docker compose --project-name <project-name> -f ~/gitops/docker-compose.yml down
# Restart containers
docker compose --project-name <project-name> -f ~/gitops/docker-compose.yml up -d
```
Note:
- pull and stop container commands can be skipped if immutable image tags are used
- `docker compose up -d` will pull new immutable tags if not found.
To migrate sites refer [site operations](./site-operations.md#migrate-site)

226
docs/setup_for_linux_mac.md Normal file
View File

@@ -0,0 +1,226 @@
# How to install ERPNext on linux/mac using Frappe_docker ?
step1: clone the repo
```
git clone https://github.com/frappe/frappe_docker
```
step2: add platform: linux/amd64 to all services in the /pwd.yaml
here is the update pwd.yml file
```yml
version: "3"
services:
backend:
image: frappe/erpnext:v15
platform: linux/amd64
deploy:
restart_policy:
condition: on-failure
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
configurator:
image: frappe/erpnext:v15
platform: linux/amd64
deploy:
restart_policy:
condition: none
entrypoint:
- bash
- -c
# add redis_socketio for backward compatibility
command:
- >
ls -1 apps > sites/apps.txt;
bench set-config -g db_host $$DB_HOST;
bench set-config -gp db_port $$DB_PORT;
bench set-config -g redis_cache "redis://$$REDIS_CACHE";
bench set-config -g redis_queue "redis://$$REDIS_QUEUE";
bench set-config -g redis_socketio "redis://$$REDIS_QUEUE";
bench set-config -gp socketio_port $$SOCKETIO_PORT;
environment:
DB_HOST: db
DB_PORT: "3306"
REDIS_CACHE: redis-cache:6379
REDIS_QUEUE: redis-queue:6379
SOCKETIO_PORT: "9000"
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
create-site:
image: frappe/erpnext:v15
platform: linux/amd64
deploy:
restart_policy:
condition: none
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
entrypoint:
- bash
- -c
command:
- >
wait-for-it -t 120 db:3306;
wait-for-it -t 120 redis-cache:6379;
wait-for-it -t 120 redis-queue:6379;
export start=`date +%s`;
until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \
[[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \
[[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]];
do
echo "Waiting for sites/common_site_config.json to be created";
sleep 5;
if (( `date +%s`-start > 120 )); then
echo "could not find sites/common_site_config.json with required keys";
exit 1
fi
done;
echo "sites/common_site_config.json found";
bench new-site --mariadb-user-host-login-scope=% --admin-password=admin --db-root-password=admin --install-app erpnext --set-default frontend;
db:
image: mariadb:10.6
platform: linux/amd64
healthcheck:
test: mysqladmin ping -h localhost --password=admin
interval: 1s
retries: 20
deploy:
restart_policy:
condition: on-failure
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
- --skip-character-set-client-handshake
- --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
environment:
MYSQL_ROOT_PASSWORD: admin
volumes:
- db-data:/var/lib/mysql
frontend:
image: frappe/erpnext:v15
platform: linux/amd64
depends_on:
- websocket
deploy:
restart_policy:
condition: on-failure
command:
- nginx-entrypoint.sh
environment:
BACKEND: backend:8000
FRAPPE_SITE_NAME_HEADER: frontend
SOCKETIO: websocket:9000
UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
UPSTREAM_REAL_IP_RECURSIVE: "off"
PROXY_READ_TIMEOUT: 120
CLIENT_MAX_BODY_SIZE: 50m
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
ports:
- "8080:8080"
queue-long:
image: frappe/erpnext:v15
platform: linux/amd64
deploy:
restart_policy:
condition: on-failure
command:
- bench
- worker
- --queue
- long,default,short
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
queue-short:
image: frappe/erpnext:v15
platform: linux/amd64
deploy:
restart_policy:
condition: on-failure
command:
- bench
- worker
- --queue
- short,default
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
redis-queue:
image: redis:6.2-alpine
platform: linux/amd64
deploy:
restart_policy:
condition: on-failure
volumes:
- redis-queue-data:/data
redis-cache:
image: redis:6.2-alpine
platform: linux/amd64
deploy:
restart_policy:
condition: on-failure
scheduler:
image: frappe/erpnext:v15
platform: linux/amd64
deploy:
restart_policy:
condition: on-failure
command:
- bench
- schedule
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
websocket:
image: frappe/erpnext:v15
platform: linux/amd64
deploy:
restart_policy:
condition: on-failure
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
volumes:
- sites:/home/frappe/frappe-bench/sites
- logs:/home/frappe/frappe-bench/logs
volumes:
db-data:
redis-queue-data:
sites:
logs:
```
step3: run the docker
```
cd frappe_docker
```
```
docker-compose -f ./pwd.yml up
```
---
Wait for couple of minutes.
Open localhost:8080

View File

@@ -1,129 +0,0 @@
# Single Bench
This setup starts traefik service as part of single docker-compose project. It is quick to get started locally or on production for a single server with single deployment.
This is not suitable when multiple services are installed on cluster with shared proxy/router, database, cache etc.
Make sure you've cloned this repository and switch to the directory before executing following commands.
## Setup Environment Variables
Copy the example docker environment file to `.env`:
For local setup
```sh
cp env-local .env
```
For production
```sh
cp env-production .env
```
To get started, copy the existing `env-local` or `env-production` file to `.env`. By default, the file will contain the following variables:
- `ERPNEXT_VERSION=edge`
- In this case, `edge` corresponds to `develop`. To setup any other version, you may use the branch name or version specific tags. (eg. v13.0.0, version-12, v11.1.15, v11).
- `FRAPPE_VERSION=edge`
- In this case, `edge` corresponds to `develop`. To setup any other version, you may use the branch name or version specific tags. (eg. v13.0.0, version-12, v11.1.15, v11).
- `MARIADB_HOST=mariadb`
- Sets the hostname to `mariadb`. This is required if the database is managed by the containerized MariaDB instance.
- `MYSQL_ROOT_PASSWORD=admin`
- Bootstraps a MariaDB container with this value set as the root password. If a managed MariaDB instance is used, there is no need to set the password here.
- In case of a separately managed database setups, set the value to the database's hostname/IP/domain.
- `SITE_NAME=erp.example.com`
- Creates this site after starting all services and installs ERPNext. Site name must be resolvable by users machines and the ERPNext components. e.g. `erp.example.com` or `mysite.localhost`.
- ``SITES=`erp.example.com` ``
- List of sites that are part of the deployment "bench" Each site is separated by a comma(,) and quoted in backtick (`). By default site created by ``SITE_NAME`` variable is added here.
- If LetsEncrypt is being setup, make sure that the DNS for all the site's domains correctly point to the current instance.
- `DB_ROOT_USER=root`
- MariaDB root username
- `ADMIN_PASSWORD=admin`
- Password for the `Administrator` user, credentials after install `Administrator:$ADMIN_PASSWORD`.
- `INSTALL_APPS=erpnext`
- Apps to install, the app must be already in the container image, to install other application read the [instructions on installing custom apps](./custom-apps-for-production.md).
- `LETSENCRYPT_EMAIL=email@example.com`
- Email for LetsEncrypt expiry notification. This is only required if you are setting up LetsEncrypt.
- `ENTRYPOINT_LABEL=traefik.http.routers.erpnext-nginx.entrypoints=websecure`
- Related to the traefik configuration, says all traffic from outside should come from HTTP or HTTPS, for local development should be web, for production websecure. if redirection is needed, read below.
- `CERT_RESOLVER_LABEL=traefik.http.routers.erpnext-nginx.tls.certresolver=myresolver`
- Which traefik resolver to use to get TLS certificate, sets `erpnext.local.no-cert-resolver` for local setup.
- ``HTTPS_REDIRECT_RULE_LABEL=traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`) ``
- Related to the traefik https redirection configuration, sets `erpnext.local.no-redirect-rule` for local setup.
- `HTTPS_REDIRECT_ENTRYPOINT_LABEL=traefik.http.routers.http-catchall.entrypoints=web`
- Related to the traefik https redirection configuration, sets `erpnext.local.no-entrypoint` for local setup.
- `HTTPS_REDIRECT_MIDDLEWARE_LABEL=traefik.http.routers.http-catchall.middlewares=redirect-to-https`
- Related to the traefik https redirection configuration, sets `erpnext.local.no-middleware` for local setup.
- `HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL=traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https`
- Related to the traefik https redirection configuration, sets `erpnext.local-no-redirect-middleware` for local setup.
Notes:
- `AUTO_MIGRATE` variable is set to `1` by default. It checks if there is semver bump or git hash change in case of develop branch and automatically migrates the sites on container start up.
- It is good practice to use image tag for specific version instead of latest. e.g `frappe-socketio:v12.5.1`, `erpnext-nginx:v12.7.1`.
## Start containers
Execute the following command:
```sh
docker-compose --project-name <project-name> up -d
```
Make sure to replace `<project-name>` with the desired name you wish to set for the project.
Notes:
- If it is the first time running and site is being initialized, *it can take multiple minutes for the site to be up*. Monitor `site-creator` container logs to check progress. Use command `docker logs <project-name>_site-creator_1 -f`
- After the site is ready the username is `Administrator` and the password is `$ADMIN_PASSWORD`
- The local deployment is for testing and REST API development purpose only
- A complete development environment is available [here](../development)
## Docker containers
The docker-compose file contains following services:
* traefik: manages letsencrypt
* volume: cert-vol
* redis-cache: cache store
* volume: redis-cache-vol
* redis-queue: used by workers
* volume: redis-queue-vol
* redis-socketio: used by socketio service
* volume: redis-socketio-vol
* mariadb: main database
* volume: mariadb-vol
* erpnext-nginx: serves static assets and proxies web request to the appropriate container, allowing to offer all services on the same port.
* volume: assets-vol and sites-vol
* erpnext-python: main application code
* volume: sites-vol and sites-vol
* frappe-socketio: enables realtime communication to the user interface through websockets
* volume: sites-vol
* erpnext-worker-default: background runner
* volume: sites-vol
* erpnext-worker-short: background runner for short-running jobs
* volume: sites-vol
* erpnext-worker-long: background runner for long-running jobs
* volume: sites-vol
* erpnext-schedule
* volume: sites-vol
* site-creator: run once container to create new site.
* volume: sites-vol
## Updating and Migrating Sites
Switch to the root of the `frappe_docker` directory before running the following commands:
```sh
# Update environment variables ERPNEXT_VERSION and FRAPPE_VERSION
nano .env
# Pull new images
docker-compose pull
# Restart containers
docker-compose --project-name <project-name> up -d
```

View File

@@ -0,0 +1,38 @@
# Single Compose Setup
This setup is a very simple single compose file that does everything to start required services and a frappe-bench. It is used to start play with docker instance with a site. The file is located in the root of repo and named `pwd.yml`.
## Services
### frappe-bench components
- backend, serves gunicorn backend
- frontend, serves static assets through nginx frontend reverse proxies websocket and gunicorn.
- queue-long, long default and short rq worker.
- queue-short, default and short rq worker.
- schedule, event scheduler.
- websocket, socketio websocket for realtime communication.
### Run once configuration
- configurator, configures `common_site_config.json` to set db and redis hosts.
- create-site, creates one site to serve as default site for the frappe-bench.
### Service dependencies
- db, mariadb, container with frappe specific configuration.
- redis-cache, redis for cache data.
- redis-queue, redis for rq data and pub/sub.
## Volumes
- sites: Volume for bench data. Common config, all sites, all site configs and site files will be stored here.
- logs: Volume for bench logs. all process logs are dumped here. No need to mount it. Each container will create a temporary volume for logs if not specified.
## Adaptation
If you understand containers use the `pwd.yml` as a reference to build more complex setup like, single server example, Docker Swarm stack, Kubernetes Helm chart, etc.
This serves only site called `frontend` through the nginx. `FRAPPE_SITE_NAME_HEADER` is set to `frontend` and a default site called `frontend` is created.
Change the `$$host` will allow container to accept any host header and serve that site. To escape `$` in compose yaml use it like `$$`. To unset default site remove `currentsite.txt` file from `sites` directory.

View File

@@ -0,0 +1,288 @@
### Single Server Example
In this use case we have a single server with a static IP attached to it. It can be used in scenarios where one powerful VM has multiple benches and applications or one entry level VM with single site. For single bench, single site setup follow only up to the point where first bench and first site is added. If you choose this setup you can only scale vertically. If you need to scale horizontally you'll need to backup the sites and restore them on to cluster setup.
We will setup the following:
- Install docker and docker compose v2 on linux server.
- Install traefik service for internal load balancer and letsencrypt.
- Install MariaDB with containers.
- Setup project called `erpnext-one` and create sites `one.example.com` and `two.example.com` in the project.
- Setup project called `erpnext-two` and create sites `three.example.com` and `four.example.com` in the project.
Explanation:
Single instance of **Traefik** will be installed and act as internal loadbalancer for multiple benches and sites hosted on the server. It can also load balance other applications along with frappe benches, e.g. wordpress, metabase, etc. We only expose the ports `80` and `443` once with this instance of traefik. Traefik will also take care of letsencrypt automation for all sites installed on the server. _Why choose Traefik over Nginx Proxy Manager?_ Traefik doesn't need additional DB service and can store certificates in a json file in a volume.
Single instance of **MariaDB** will be installed and act as database service for all the benches/projects installed on the server.
Each instance of ERPNext project (bench) will have its own redis, socketio, gunicorn, nginx, workers and scheduler. It will connect to internal MariaDB by connecting to MariaDB network. It will expose sites to public through Traefik by connecting to Traefik network.
### Install Docker
Easiest way to install docker is to use the [convenience script](https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script).
```shell
curl -fsSL https://get.docker.com | bash
```
Note: The documentation assumes Ubuntu LTS server is used. Use any distribution as long as the docker convenience script works. If the convenience script doesn't work, you'll need to install docker manually.
### Install Compose V2
Refer [original documentation](https://docs.docker.com/compose/cli-command/#install-on-linux) for updated version.
```shell
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
```
### Prepare
Clone `frappe_docker` repo for the needed YAMLs and change the current working directory of your shell to the cloned repo.
```shell
git clone https://github.com/frappe/frappe_docker
cd frappe_docker
```
Create configuration and resources directory
```shell
mkdir ~/gitops
```
The `~/gitops` directory will store all the resources that we use for setup. We will also keep the environment files in this directory as there will be multiple projects with different environment variables. You can create a private repo for this directory and track the changes there.
### Install Traefik
Basic Traefik setup using docker compose.
Create a file called `traefik.env` in `~/gitops`
```shell
echo 'TRAEFIK_DOMAIN=traefik.example.com' > ~/gitops/traefik.env
echo 'EMAIL=admin@example.com' >> ~/gitops/traefik.env
echo "HASHED_PASSWORD='$(openssl passwd -apr1 changeit)'" >> ~/gitops/traefik.env
```
Note:
- Change the domain from `traefik.example.com` to the one used in production. DNS entry needs to point to the Server IP.
- Change the letsencrypt notification email from `admin@example.com` to correct email.
- Change the password from `changeit` to more secure.
env file generated at location `~/gitops/traefik.env` will look like following:
```env
TRAEFIK_DOMAIN=traefik.example.com
EMAIL=admin@example.com
HASHED_PASSWORD=$apr1$K.4gp7RT$tj9R2jHh0D4Gb5o5fIAzm/
```
If Container does not deploy put the HASHED_PASSWORD in ''.
Deploy the traefik container with letsencrypt SSL
```shell
docker compose --project-name traefik \
--env-file ~/gitops/traefik.env \
-f overrides/compose.traefik.yaml \
-f overrides/compose.traefik-ssl.yaml up -d
```
This will make the traefik dashboard available on `traefik.example.com` and all certificates will reside in the Docker volume `cert-data`.
For LAN setup deploy the traefik container without overriding `overrides/compose.traefik-ssl.yaml`.
### Install MariaDB
Basic MariaDB setup using docker compose.
Create a file called `mariadb.env` in `~/gitops`
```shell
echo "DB_PASSWORD=changeit" > ~/gitops/mariadb.env
```
Note:
- Change the password from `changeit` to more secure.
env file generated at location `~/gitops/mariadb.env` will look like following:
```env
DB_PASSWORD=changeit
```
Note: Change the password from `changeit` to more secure one.
Deploy the mariadb container
```shell
docker compose --project-name mariadb --env-file ~/gitops/mariadb.env -f overrides/compose.mariadb-shared.yaml up -d
```
This will make `mariadb-database` service available under `mariadb-network`. Data will reside in `/data/mariadb`.
### Install ERPNext
#### Create first bench
Create first bench called `erpnext-one` with `one.example.com` and `two.example.com`
Create a file called `erpnext-one.env` in `~/gitops`
```shell
cp example.env ~/gitops/erpnext-one.env
sed -i 's/DB_PASSWORD=123/DB_PASSWORD=changeit/g' ~/gitops/erpnext-one.env
sed -i 's/DB_HOST=/DB_HOST=mariadb-database/g' ~/gitops/erpnext-one.env
sed -i 's/DB_PORT=/DB_PORT=3306/g' ~/gitops/erpnext-one.env
sed -i 's/SITES=`erp.example.com`/SITES=\`one.example.com\`,\`two.example.com\`/g' ~/gitops/erpnext-one.env
echo 'ROUTER=erpnext-one' >> ~/gitops/erpnext-one.env
echo "BENCH_NETWORK=erpnext-one" >> ~/gitops/erpnext-one.env
```
Note:
- Change the password from `changeit` to the one set for MariaDB compose in the previous step.
env file is generated at location `~/gitops/erpnext-one.env`.
Create a yaml file called `erpnext-one.yaml` in `~/gitops` directory:
```shell
docker compose --project-name erpnext-one \
--env-file ~/gitops/erpnext-one.env \
-f compose.yaml \
-f overrides/compose.redis.yaml \
-f overrides/compose.multi-bench.yaml \
-f overrides/compose.multi-bench-ssl.yaml config > ~/gitops/erpnext-one.yaml
```
For LAN setup do not override `compose.multi-bench-ssl.yaml`.
Use the above command after any changes are made to `erpnext-one.env` file to regenerate `~/gitops/erpnext-one.yaml`. e.g. after changing version to migrate the bench.
Deploy `erpnext-one` containers:
```shell
docker compose --project-name erpnext-one -f ~/gitops/erpnext-one.yaml up -d
```
Create sites `one.example.com` and `two.example.com`:
```shell
# one.example.com
docker compose --project-name erpnext-one exec backend \
bench new-site --mariadb-user-host-login-scope=% --db-root-password changeit --install-app erpnext --admin-password changeit one.example.com
```
You can stop here and have a single bench single site setup complete. Continue to add one more site to the current bench.
```shell
# two.example.com
docker compose --project-name erpnext-one exec backend \
bench new-site --mariadb-user-host-login-scope=% --db-root-password changeit --install-app erpnext --admin-password changeit two.example.com
```
#### Create second bench
Setting up additional bench is optional. Continue only if you need multi bench setup.
Create second bench called `erpnext-two` with `three.example.com` and `four.example.com`
Create a file called `erpnext-two.env` in `~/gitops`
```shell
curl -sL https://raw.githubusercontent.com/frappe/frappe_docker/main/example.env -o ~/gitops/erpnext-two.env
sed -i 's/DB_PASSWORD=123/DB_PASSWORD=changeit/g' ~/gitops/erpnext-two.env
sed -i 's/DB_HOST=/DB_HOST=mariadb-database/g' ~/gitops/erpnext-two.env
sed -i 's/DB_PORT=/DB_PORT=3306/g' ~/gitops/erpnext-two.env
echo "ROUTER=erpnext-two" >> ~/gitops/erpnext-two.env
echo "SITES=\`three.example.com\`,\`four.example.com\`" >> ~/gitops/erpnext-two.env
echo "BENCH_NETWORK=erpnext-two" >> ~/gitops/erpnext-two.env
```
Note:
- Change the password from `changeit` to the one set for MariaDB compose in the previous step.
env file is generated at location `~/gitops/erpnext-two.env`.
Create a yaml file called `erpnext-two.yaml` in `~/gitops` directory:
```shell
docker compose --project-name erpnext-two \
--env-file ~/gitops/erpnext-two.env \
-f compose.yaml \
-f overrides/compose.redis.yaml \
-f overrides/compose.multi-bench.yaml \
-f overrides/compose.multi-bench-ssl.yaml config > ~/gitops/erpnext-two.yaml
```
Use the above command after any changes are made to `erpnext-two.env` file to regenerate `~/gitops/erpnext-two.yaml`. e.g. after changing version to migrate the bench.
Deploy `erpnext-two` containers:
```shell
docker compose --project-name erpnext-two -f ~/gitops/erpnext-two.yaml up -d
```
Create sites `three.example.com` and `four.example.com`:
```shell
# three.example.com
docker compose --project-name erpnext-two exec backend \
bench new-site --mariadb-user-host-login-scope=% --db-root-password changeit --install-app erpnext --admin-password changeit three.example.com
# four.example.com
docker compose --project-name erpnext-two exec backend \
bench new-site --mariadb-user-host-login-scope=% --db-root-password changeit --install-app erpnext --admin-password changeit four.example.com
```
#### Create custom domain to existing site
In case you need to point custom domain to existing site follow these steps.
Also useful if custom domain is required for LAN based access.
Create environment file
```shell
echo "ROUTER=custom-one-example" > ~/gitops/custom-one-example.env
echo "SITES=\`custom-one.example.com\`" >> ~/gitops/custom-one-example.env
echo "BASE_SITE=one.example.com" >> ~/gitops/custom-one-example.env
echo "BENCH_NETWORK=erpnext-one" >> ~/gitops/custom-one-example.env
```
Note:
- Change the file name from `custom-one-example.env` to a logical one.
- Change `ROUTER` variable from `custom-one.example.com` to the one being added.
- Change `SITES` variable from `custom-one.example.com` to the one being added. You can add multiple sites quoted in backtick (`) and separated by commas.
- Change `BASE_SITE` variable from `one.example.com` to the one which is being pointed to.
- Change `BENCH_NETWORK` variable from `erpnext-one` to the one which was created with the bench.
env file is generated at location mentioned in command.
Generate yaml to reverse proxy:
```shell
docker compose --project-name custom-one-example \
--env-file ~/gitops/custom-one-example.env \
-f overrides/compose.custom-domain.yaml \
-f overrides/compose.custom-domain-ssl.yaml config > ~/gitops/custom-one-example.yaml
```
For LAN setup do not override `compose.custom-domain-ssl.yaml`.
Deploy `erpnext-two` containers:
```shell
docker compose --project-name custom-one-example -f ~/gitops/custom-one-example.yaml up -d
```
### Site operations
Refer: [site operations](./site-operations.md)

View File

@@ -1,190 +1,54 @@
# Site operations
Create and use env file to pass environment variables to containers,
> 💡 You should setup `--project-name` option in `docker-compose` commands if you have non-standard project name.
```sh
source .env
```
Or specify environment variables instead of passing secrets as command arguments. Refer notes section for environment variables required
## Setup New Site
## Setup new site
Note:
- Wait for the database service to start before trying to create a new site.
- If new site creation fails, retry after the MariaDB container is up and running.
- If you're using a managed database instance, make sure that the database is running before setting up a new site.
#### MariaDB Site
- Wait for the `db` service to start and `configurator` to exit before trying to create a new site. Usually this takes up to 10 seconds.
- Also you have to pass `-p <project_name>` if `-p` passed previously eg. `docker-compose -p <project_name> exec (rest of the command)`.
```sh
# Create ERPNext site
docker run \
-e "SITE_NAME=$SITE_NAME" \
-e "DB_ROOT_USER=$DB_ROOT_USER" \
-e "MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD" \
-e "ADMIN_PASSWORD=$ADMIN_PASSWORD" \
-e "INSTALL_APPS=erpnext" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
--network <project-name>_default \
frappe/erpnext-worker:$VERSION new
docker-compose exec backend bench new-site --mariadb-user-host-login-scope=% --db-root-password <db-password> --admin-password <admin-password> <site-name>
```
#### PostgreSQL Site
If you need to install some app, specify `--install-app`. To see all options, just run `bench new-site --help`.
PostgreSQL is only available v12 onwards. It is NOT available for ERPNext.
It is available as part of `frappe/erpnext-worker`. It inherits from `frappe/frappe-worker`.
To create Postgres site (assuming you already use [Postgres compose override](images-and-compose-files.md#overrides)) you need have to do set `root_login` and `root_password` in common config before that:
```sh
# Create ERPNext site
docker run \
-e "SITE_NAME=$SITE_NAME" \
-e "DB_ROOT_USER=$DB_ROOT_USER" \
-e "POSTGRES_HOST=$POSTGRES_HOST" \
-e "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" \
-e "ADMIN_PASSWORD=$ADMIN_PASSWORD" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
--network <project-name>_default \
frappe/erpnext-worker:$VERSION new
docker-compose exec backend bench set-config -g root_login <root-login>
docker-compose exec backend bench set-config -g root_password <root-password>
```
Environment Variables needed:
- `SITE_NAME`: name of the new site to create. Site name is domain name that resolves. e.g. `erp.example.com` or `erp.localhost`.
- `DB_ROOT_USER`: MariaDB/PostgreSQL Root user.
- `MYSQL_ROOT_PASSWORD`: In case of the MariaDB docker container use the one set in `MYSQL_ROOT_PASSWORD` in previous steps. In case of a managed database use the appropriate password.
- `MYSQL_ROOT_PASSWORD_FILE` - When the MariaDB root password is stored using docker secrets.
- `ADMIN_PASSWORD`: set the administrator password for the new site.
- `ADMIN_PASSWORD_FILE`: set the administrator password for the new site using docker secrets.
- `INSTALL_APPS=erpnext`: available only in erpnext-worker and erpnext containers (or other containers with custom apps). Installs ERPNext (and/or the specified apps, comma-delinieated) on this new site.
- `FORCE=1`: optional variable which force installation of the same site.
Environment Variables for PostgreSQL only:
- `POSTGRES_HOST`: host for PostgreSQL server
- `POSTGRES_PASSWORD`: Password for `postgres`. The database root user.
Notes:
- To setup existing frappe-bench deployment with default database as PostgreSQL edit the common_site_config.json and set `db_host` to PostgreSQL hostname and `db_port` to PostgreSQL port.
- To create new frappe-bench deployment with default database as PostgreSQL use `POSTGRES_HOST` and `DB_PORT` environment variables in `erpnext-python` service instead of `MARIADB_HOST`
## Add sites to proxy
Change `SITES` variable to the list of sites created encapsulated in backtick and separated by comma with no space. e.g. ``SITES=`site1.example.com`,`site2.example.com` ``.
Reload variables with following command.
Also command is slightly different:
```sh
docker-compose --project-name <project-name> up -d
docker-compose exec backend bench new-site --mariadb-user-host-login-scope=% --db-type postgres --admin-password <admin-password> <site-name>
```
## Backup Sites
## Push backup to S3 storage
Environment Variables
- `SITES` is list of sites separated by `:` colon to migrate. e.g. `SITES=site1.domain.com` or `SITES=site1.domain.com:site2.domain.com` By default all sites in bench will be backed up.
- `WITH_FILES` if set to 1, it will backup user-uploaded files.
- By default `backup` takes mariadb dump and gzips it. Example file, `20200325_221230-test_localhost-database.sql.gz`
- If `WITH_FILES` is set then it will also backup public and private files of each site as uncompressed tarball. Example files, `20200325_221230-test_localhost-files.tar` and `20200325_221230-test_localhost-private-files.tar`
- All the files generated by backup are placed at volume location `sites-vol:/{site-name}/private/backups/*`
We have the script that helps to push latest backup to S3.
```sh
docker run \
-e "SITES=site1.domain.com:site2.domain.com" \
-e "WITH_FILES=1" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
--network <project-name>_default \
frappe/erpnext-worker:$VERSION backup
docker-compose exec backend push_backup.py --site-name <site-name> --bucket <bucket> --region-name <region> --endpoint-url <endpoint-url> --aws-access-key-id <access-key> --aws-secret-access-key <secret-key>
```
The backup will be available in the `sites-vol` volume.
## Push backup to s3 compatible storage
Environment Variables
- `BUCKET_NAME`, Required to set bucket created on S3 compatible storage.
- `REGION`, Required to set region for S3 compatible storage.
- `ACCESS_KEY_ID`, Required to set access key.
- `SECRET_ACCESS_KEY`, Required to set secret access key.
- `ENDPOINT_URL`, Required to set URL of S3 compatible storage.
- `BUCKET_DIR`, Required to set directory in bucket where sites from this deployment will be backed up.
- `BACKUP_LIMIT`, Optionally set this to limit number of backups in bucket directory. Defaults to 3.
```sh
docker run \
-e "BUCKET_NAME=backups" \
-e "REGION=region" \
-e "ACCESS_KEY_ID=access_id_from_provider" \
-e "SECRET_ACCESS_KEY=secret_access_from_provider" \
-e "ENDPOINT_URL=https://region.storage-provider.com" \
-e "BUCKET_DIR=frappe-bench" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
--network <project-name>_default \
frappe/frappe-worker:$VERSION push-backup
```
Note:
- Above example will backup files in bucket called `backup` at location `frappe-bench-v13/site.name.com/DATE_TIME/DATE_TIME-site_name_com-{filetype}.{extension}`,
- example DATE_TIME: 20200325_042020.
- example filetype: database, files or private-files
- example extension: sql.gz or tar
## Restore backups
Environment Variables
- `MYSQL_ROOT_PASSWORD` or `MYSQL_ROOT_PASSWORD_FILE`(when using docker secrets), Required to restore mariadb backups.
- `BUCKET_NAME`, Required to set bucket created on S3 compatible storage.
- `ACCESS_KEY_ID`, Required to set access key.
- `SECRET_ACCESS_KEY`, Required to set secret access key.
- `ENDPOINT_URL`, Required to set URL of S3 compatible storage.
- `REGION`, Required to set region for s3 compatible storage.
- `BUCKET_DIR`, Required to set directory in bucket where sites from this deployment will be backed up.
```sh
docker run \
-e "MYSQL_ROOT_PASSWORD=admin" \
-e "BUCKET_NAME=backups" \
-e "REGION=region" \
-e "ACCESS_KEY_ID=access_id_from_provider" \
-e "SECRET_ACCESS_KEY=secret_access_from_provider" \
-e "ENDPOINT_URL=https://region.storage-provider.com" \
-e "BUCKET_DIR=frappe-bench" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
-v ./backups:/home/frappe/backups \
--network <project-name>_default \
frappe/frappe-worker:$VERSION restore-backup
```
Note:
- Volume must be mounted at location `/home/frappe/backups` for restoring sites
- If no backup files are found in volume, it will use s3 credentials to pull backups
- Backup structure for mounted volume or downloaded from s3:
- /home/frappe/backups
- site1.domain.com
- 20200420_162000
- 20200420_162000-site1_domain_com-*
- site2.domain.com
- 20200420_162000
- 20200420_162000-site2_domain_com-*
Note that you can restore backup only manually.
## Edit configs
Editing config manually might be required in some cases,
one such case is to use Amazon RDS (or any other DBaaS).
For full instructions, refer to the [wiki](https://github.com/frappe/frappe/wiki/Using-Frappe-with-Amazon-RDS-(or-any-other-DBaaS)). Common question can be found in Issues and on forum.
For full instructions, refer to the [wiki](<https://github.com/frappe/frappe/wiki/Using-Frappe-with-Amazon-RDS-(or-any-other-DBaaS)>). Common question can be found in Issues and on forum.
`common_site_config.json` or `site_config.json` from `sites-vol` volume has to be edited using following command:
`common_site_config.json` or `site_config.json` from `sites` volume has to be edited using following command:
```sh
docker run \
-it \
-v <project-name>_sites-vol:/sites \
docker run --rm -it \
-v <project-name>_sites:/sites \
alpine vi /sites/common_site_config.json
```
@@ -195,8 +59,7 @@ Instead of `alpine` use any image of your choice.
For socketio and gunicorn service ping the hostname:port and that will be sufficient. For workers and scheduler, there is a command that needs to be executed.
```shell
docker exec -it <project-name>_erpnext-worker-d \
docker-entrypoint.sh doctor -p postgresql:5432 --ping-service mongodb:27017
docker-compose exec backend healthcheck.sh --ping-service mongodb:27017
```
Additional services can be pinged as part of health check with option `-p` or `--ping-service`.
@@ -204,87 +67,20 @@ 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.
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 \
--user frappe \
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 \
--user frappe \
frappe/frappe-worker:$VERSION bench --site erp.mysite.com clear-cache
```
Notes:
- Use it to install/uninstall custom apps, add system manager user, etc.
- To run the command as non root user add the command option `--user frappe`.
## Delete/Drop Site
#### MariaDB Site
For reference of commands like `backup`, `drop-site` or `migrate` check [official guide](https://frappeframework.com/docs/v13/user/en/bench/frappe-commands) or run:
```sh
# Delete/Drop ERPNext site
docker run \
-e "SITE_NAME=$SITE_NAME" \
-e "DB_ROOT_USER=$DB_ROOT_USER" \
-e "MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
--network <project-name>_default \
frappe/erpnext-worker:$VERSION drop
docker-compose exec backend bench --help
```
#### PostgreSQL Site
## Migrate site
Note:
- Wait for the `db` service to start and `configurator` to exit before trying to migrate a site. Usually this takes up to 10 seconds.
```sh
# Delete/Drop ERPNext site
docker run \
-e "SITE_NAME=$SITE_NAME" \
-e "DB_ROOT_USER=$DB_ROOT_USER" \
-e "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
--network <project-name>_default \
frappe/erpnext-worker:$VERSION drop
docker-compose exec backend bench --site <site-name> migrate
```
Environment Variables needed:
- `SITE_NAME`: name of the site to be deleted. Site name is domain name that resolves. e.g. `erp.example.com` or `erp.localhost`.
- `DB_ROOT_USER`: MariaDB/PostgreSQL Root user.
- `MYSQL_ROOT_PASSWORD`: Root User password for MariaDB.
- `FORCE=1`: optional variable which force deletion of the same site.
- `NO_BACKUP=1`: option variable to skip the process of taking backup before deleting the site.
Environment Variables for PostgreSQL only:
- `POSTGRES_PASSWORD`: Password for `postgres`. The database root user.
## Migrate Site
```sh
# Migrate ERPNext site
docker run \
-e "MAINTENANCE_MODE=1" \
-v <project-name>_sites-vol:/home/frappe/frappe-bench/sites \
-v <project-name>_assets-vol:/home/frappe/frappe-bench/sites/assets \
--network <project-name>_default \
frappe/erpnext-worker:$ERPNEXT_VERSION migrate
```
Environment Variables needed:
- `MAINTENANCE_MODE`: If set to `1`, this will ensure the bench is switched to maintenance mode during migration.
- `SITES`: Optional list of sites to be migrated, separated by colon (`:`). e.g. `erp.site1.com:erp.site2.com`. If not used, all sites will be migrated by default.

View File

@@ -1,15 +0,0 @@
# Tips for moving deployments
- Take regular automatic backups and push the files to S3 compatible cloud. Setup backup and push with cronjobs
- Use regular cron for single machine installs
- Use [swarm-cronjob](https://github.com/crazy-max/swarm-cronjob) for docker swarm
- Use Kubernetes CronJob
- It makes it easy to transfer data from cloud to any new deployment.
- They are just [site operations](site-operations.md) that can be manually pipelined as per need.
- Remember to restore encryption keys and other custom configuration from `site_config.json`.
- Steps to move deployment:
- [Take backup](site-operations.md#backup-sites)
- [Push backup to cloud](site-operations.md#push-backup-to-s3-compatible-storage)
- Create new deployment type anywhere
- [Restore backup from cloud](site-operations.md#restore-backups)
- [Restore `site_config.json` from cloud](site-operations.md#edit-configs)

View File

@@ -0,0 +1,25 @@
# Accessing ERPNext through https on local deployment
- ERPNext container deployment can be accessed through https easily using Caddy web server, Caddy will be used as reverse proxy and forward traffics to the frontend container.
### Prerequisites
- Caddy
- Adding a domain name to hosts file
#### Installation of caddy webserver
- Follow the official Caddy website for the installation guide https://caddyserver.com/docs/install
After completing the installation open the configuration file of Caddy ( You find the config file in ` /etc/caddy/Caddyfile`), add the following configuration to forward traffics to the ERPNext frontend container
```js
erp.localdev.net {
tls internal
reverse_proxy localhost:8085 {
}
}
```
- Caddy's root certificate must be added to other computers if computers from different networks access the ERPNext through https.

79
docs/troubleshoot.md Normal file
View File

@@ -0,0 +1,79 @@
1. [Fixing MariaDB issues after rebuilding the container](#fixing-mariadb-issues-after-rebuilding-the-container)
1. [docker-compose does not recognize variables from `.env` file](#docker-compose-does-not-recognize-variables-from-env-file)
1. [Windows Based Installation](#windows-based-installation)
### Fixing MariaDB issues after rebuilding the container
For any reason after rebuilding the container if you are not be able to access MariaDB correctly (i.e. `Access denied for user [...]`) with the previous configuration. Follow these instructions.
First test for network issues. Manually connect to the database through the `backend` container:
```
docker exec -it frappe_docker-backend-1 bash
mysql -uroot -padmin -hdb
```
Replace `root` with the database root user name, `admin` with the root password, and `db` with the service name specified in the docker-compose `.yml` configuration file. If the connection to the database is successful, then the network configuration is correct and you can proceed to the next step. Otherwise, modify the docker-compose `.yml` configuration file, in the `configurator` service's `environment` section, to use the container names (`frappe_docker-db-1`, `frappe_docker-redis-cache-1`, `frappe_docker-redis-queue-1` or as otherwise shown with `docker ps`) instead of the service names and rebuild the containers.
Then, the parameter `'db_name'@'%'` needs to be set in MariaDB and permission to the site database suitably assigned to the user.
This step has to be repeated for all sites available under the current bench.
Example shows the queries to be executed for site `localhost`
Open sites/localhost/site_config.json:
```shell
code sites/localhost/site_config.json
```
and take note of the parameters `db_name` and `db_password`.
Enter MariaDB Interactive shell:
```shell
mysql -uroot -padmin -hdb
```
The parameter `'db_name'@'%'` must not be duplicated. Verify that it is unique with the command:
```
SELECT User, Host FROM mysql.user;
```
Delete duplicated entries, if found, with the following:
```
DROP USER 'db_name'@'host';
```
Modify permissions by executing following queries replacing `db_name` and `db_password` with the values found in site_config.json.
```sql
-- if there is no user created already first try to created it using the next command
-- CREATE USER 'db_name'@'%' IDENTIFIED BY 'your_password';
-- skip the upgrade command below if you use the create command above
UPDATE mysql.global_priv SET Host = '%' where User = 'db_name'; FLUSH PRIVILEGES;
SET PASSWORD FOR 'db_name'@'%' = PASSWORD('db_password'); FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON `db_name`.* TO 'db_name'@'%' IDENTIFIED BY 'db_password' WITH GRANT OPTION; FLUSH PRIVILEGES;
EXIT;
```
Note: For MariaDB 10.3 and older use `mysql.user` instead of `mysql.global_priv`.
### docker-compose does not recognize variables from `.env` file
If you are using old version of `docker-compose` the .env file needs to be located in directory from where the docker-compose command is executed. There may also be difference in official `docker-compose` and the one packaged by distro. Use `--env-file=.env` if available to explicitly specify the path to file.
### Windows Based Installation
- Set environment variable `COMPOSE_CONVERT_WINDOWS_PATHS` e.g. `set COMPOSE_CONVERT_WINDOWS_PATHS=1`
- While using docker machine, port-forward the ports of VM to ports of host machine. (ports 8080/8000/9000)
- Name all the sites ending with `.localhost`. and access it via browser locally. e.g. `http://site1.localhost`
### Redo installation
- If you have made changes and just want to start over again (abandoning all changes), remove all docker
- containers
- images
- volumes
- Install a fresh

1
encoded-apps-b64.txt Normal file
View File

@@ -0,0 +1 @@
WwogICAgewogICAgICAgICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyYXBwZS9lcnBuZXh0IiwKICAgICAgICAiYnJhbmNoIjogInZlcnNpb24tMTUiCiAgICB9LAogICAgewogICAgICAgICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyYXBwZS9ocm1zIiwKICAgICAgICAiYnJhbmNoIjogInZlcnNpb24tMTUiCiAgICB9LAogICAgewogICAgICAgICJ1cmwiOiAiaHR0cHM6Ly9naXRodWIuY29tL2ZyYXBwZS9oZWxwZGVzayIsCiAgICAgICAgImJyYW5jaCI6ICJtYWluIgogICAgfSwKICAgIHsKICAgICAgICAidXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9mcmFwcGUvcGF5bWVudHMiLAogICAgICAgICJicmFuY2giOiAidmVyc2lvbi0xNSIKICAgIH0KXQ==

View File

@@ -1,7 +0,0 @@
ERPNEXT_VERSION=edge
FRAPPE_VERSION=edge
MARIADB_HOST=mariadb
MYSQL_ROOT_PASSWORD=admin
SITES=your.domain.com
LETSENCRYPT_EMAIL=your.email@your.domain.com
SKIP_NGINX_TEMPLATE_GENERATION=0

View File

@@ -1,18 +0,0 @@
LETSENCRYPT_EMAIL=email@example.com
ERPNEXT_VERSION=edge
FRAPPE_VERSION=edge
MARIADB_HOST=mariadb
MYSQL_ROOT_PASSWORD=admin
SITE_NAME=mysite.localhost
SITES=`mysite.localhost`
DB_ROOT_USER=root
ADMIN_PASSWORD=admin
INSTALL_APPS=erpnext
ENTRYPOINT_LABEL=traefik.http.routers.erpnext-nginx.entrypoints=web
CERT_RESOLVER_LABEL=erpnext.local.no-cert-resolver
HTTPS_REDIRECT_RULE_LABEL=erpnext.local.no-redirect-rule
HTTPS_REDIRECT_ENTRYPOINT_LABEL=erpnext.local.no-entrypoint
HTTPS_REDIRECT_MIDDLEWARE_LABEL=erpnext.local.no-middleware
HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL=erpnext.local-no-redirect-middleware
SKIP_NGINX_TEMPLATE_GENERATION=0
WORKER_CLASS=gthread

Some files were not shown because too many files have changed in this diff Show More