mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-23 00:05:09 +00:00
Merge branch 'main' into main
This commit is contained in:
commit
d4e9909580
16 changed files with 73 additions and 45 deletions
4
.github/workflows/build_bench.yml
vendored
4
.github/workflows/build_bench.yml
vendored
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
run: echo "LATEST_BENCH_RELEASE=$(curl -s 'https://api.github.com/repos/frappe/bench/releases/latest' | jq -r '.tag_name')" >> "$GITHUB_ENV"
|
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
|
- name: Build and test
|
||||||
uses: docker/bake-action@v6.3.0
|
uses: docker/bake-action@v6.6.0
|
||||||
with:
|
with:
|
||||||
source: .
|
source: .
|
||||||
targets: bench-test
|
targets: bench-test
|
||||||
|
|
@ -52,7 +52,7 @@ jobs:
|
||||||
|
|
||||||
- name: Push
|
- name: Push
|
||||||
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
||||||
uses: docker/bake-action@v6.3.0
|
uses: docker/bake-action@v6.6.0
|
||||||
with:
|
with:
|
||||||
targets: bench
|
targets: bench
|
||||||
push: true
|
push: true
|
||||||
|
|
|
||||||
2
.github/workflows/build_stable.yml
vendored
2
.github/workflows/build_stable.yml
vendored
|
|
@ -100,7 +100,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup deploy key
|
- name: Setup deploy key
|
||||||
uses: webfactory/ssh-agent@v0.8.0
|
uses: webfactory/ssh-agent@v0.9.1
|
||||||
with:
|
with:
|
||||||
ssh-private-key: ${{ secrets.HELM_DEPLOY_KEY }}
|
ssh-private-key: ${{ secrets.HELM_DEPLOY_KEY }}
|
||||||
|
|
||||||
|
|
|
||||||
10
.github/workflows/docker-build-push.yml
vendored
10
.github/workflows/docker-build-push.yml
vendored
|
|
@ -34,7 +34,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
registry:
|
registry:
|
||||||
image: registry:2
|
image: docker.io/registry:2
|
||||||
ports:
|
ports:
|
||||||
- 5000:5000
|
- 5000:5000
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -47,6 +47,9 @@ jobs:
|
||||||
|
|
||||||
- name: Setup QEMU
|
- name: Setup QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
with:
|
||||||
|
image: tonistiigi/binfmt:latest
|
||||||
|
platforms: all
|
||||||
|
|
||||||
- name: Setup Buildx
|
- name: Setup Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
@ -63,7 +66,7 @@ jobs:
|
||||||
echo "NODE_VERSION=${{ inputs.node_version }}" >> "$GITHUB_ENV"
|
echo "NODE_VERSION=${{ inputs.node_version }}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: docker/bake-action@v6.3.0
|
uses: docker/bake-action@v6.6.0
|
||||||
with:
|
with:
|
||||||
source: .
|
source: .
|
||||||
push: true
|
push: true
|
||||||
|
|
@ -92,6 +95,7 @@ jobs:
|
||||||
|
|
||||||
- name: Push
|
- name: Push
|
||||||
if: ${{ inputs.push }}
|
if: ${{ inputs.push }}
|
||||||
uses: docker/bake-action@v6.3.0
|
uses: docker/bake-action@v6.6.0
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
|
set: "*.platform=linux/amd64,linux/arm64"
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ repos:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
- repo: https://github.com/pycqa/isort
|
- repo: https://github.com/pycqa/isort
|
||||||
rev: 6.0.0
|
rev: 6.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
|
|
@ -27,6 +27,8 @@ repos:
|
||||||
rev: v4.0.0-alpha.8
|
rev: v4.0.0-alpha.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
|
additional_dependencies:
|
||||||
|
- prettier@3.5.2
|
||||||
|
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: v2.4.1
|
rev: v2.4.1
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ After cloning the repo run this command to build multi-architecture images speci
|
||||||
|
|
||||||
and then
|
and then
|
||||||
|
|
||||||
- add `platform: linux/arm64` to all services in the pwd.yaml
|
- add `platform: linux/arm64` to all services in the `pwd.yml`
|
||||||
- replace the current specified versions of erpnext image on `pwd.yml` with `:latest`
|
- replace the current specified versions of erpnext image on `pwd.yml` with `:latest`
|
||||||
|
|
||||||
Then run: `docker compose -f pwd.yml up -d`
|
Then run: `docker compose -f pwd.yml up -d`
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,7 @@ def create_site_in_bench(args):
|
||||||
new_site_cmd = [
|
new_site_cmd = [
|
||||||
"bench",
|
"bench",
|
||||||
"new-site",
|
"new-site",
|
||||||
|
f"--db-root-username=root",
|
||||||
f"--db-host=mariadb", # Should match the compose service name
|
f"--db-host=mariadb", # Should match the compose service name
|
||||||
f"--db-type={args.db_type}", # Add the selected database type
|
f"--db-type={args.db_type}", # Add the selected database type
|
||||||
f"--mariadb-user-host-login-scope=%",
|
f"--mariadb-user-host-login-scope=%",
|
||||||
|
|
@ -222,6 +223,7 @@ def create_site_in_bench(args):
|
||||||
new_site_cmd = [
|
new_site_cmd = [
|
||||||
"bench",
|
"bench",
|
||||||
"new-site",
|
"new-site",
|
||||||
|
f"--db-root-username=root",
|
||||||
f"--db-host=postgresql", # Should match the compose service name
|
f"--db-host=postgresql", # Should match the compose service name
|
||||||
f"--db-type={args.db_type}", # Add the selected database type
|
f"--db-type={args.db_type}", # Add the selected database type
|
||||||
f"--db-root-password=123", # Replace with your PostgreSQL password
|
f"--db-root-password=123", # Replace with your PostgreSQL password
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Bench Web",
|
"name": "Bench Web",
|
||||||
"type": "python",
|
"type": "debugpy",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
|
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
|
||||||
"args": [
|
"args": [
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
"--noreload",
|
"--noreload",
|
||||||
"--nothreading"
|
"--nothreading"
|
||||||
],
|
],
|
||||||
"pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python",
|
|
||||||
"cwd": "${workspaceFolder}/frappe-bench/sites",
|
"cwd": "${workspaceFolder}/frappe-bench/sites",
|
||||||
"env": {
|
"env": {
|
||||||
"DEV_SERVER": "1"
|
"DEV_SERVER": "1"
|
||||||
|
|
@ -25,11 +24,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Bench Short Worker",
|
"name": "Bench Short Worker",
|
||||||
"type": "python",
|
"type": "debugpy",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
|
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
|
||||||
"args": ["frappe", "worker", "--queue", "short"],
|
"args": ["frappe", "worker", "--queue", "short"],
|
||||||
"pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python",
|
|
||||||
"cwd": "${workspaceFolder}/frappe-bench/sites",
|
"cwd": "${workspaceFolder}/frappe-bench/sites",
|
||||||
"env": {
|
"env": {
|
||||||
"DEV_SERVER": "1"
|
"DEV_SERVER": "1"
|
||||||
|
|
@ -37,11 +35,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Bench Long Worker",
|
"name": "Bench Long Worker",
|
||||||
"type": "python",
|
"type": "debugpy",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
|
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
|
||||||
"args": ["frappe", "worker", "--queue", "long"],
|
"args": ["frappe", "worker", "--queue", "long"],
|
||||||
"pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python",
|
|
||||||
"cwd": "${workspaceFolder}/frappe-bench/sites",
|
"cwd": "${workspaceFolder}/frappe-bench/sites",
|
||||||
"env": {
|
"env": {
|
||||||
"DEV_SERVER": "1"
|
"DEV_SERVER": "1"
|
||||||
|
|
@ -49,21 +46,21 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Honcho SocketIO Watch Schedule Worker",
|
"name": "Honcho SocketIO Watch Schedule Worker",
|
||||||
"type": "python",
|
"type": "debugpy",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
|
"python": "/home/frappe/.pyenv/shims/python",
|
||||||
"program": "/home/frappe/.local/bin/honcho",
|
"program": "/home/frappe/.local/bin/honcho",
|
||||||
"pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python",
|
|
||||||
"cwd": "${workspaceFolder}/frappe-bench",
|
"cwd": "${workspaceFolder}/frappe-bench",
|
||||||
"console": "internalConsole",
|
"console": "internalConsole",
|
||||||
"args": [
|
"args": ["start", "socketio", "watch", "schedule", "worker"],
|
||||||
"start",
|
"postDebugTask": "Clean Honcho SocketIO Watch Schedule Worker"
|
||||||
"socketio",
|
}
|
||||||
"watch",
|
],
|
||||||
"schedule",
|
"compounds": [
|
||||||
"worker_short",
|
{
|
||||||
"worker_long",
|
"name": "Honcho + Web debug",
|
||||||
"worker_default"
|
"configurations": ["Bench Web", "Honcho SocketIO Watch Schedule Worker"],
|
||||||
]
|
"stopAll": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
development/vscode-example/tasks.json
Normal file
22
development/vscode-example/tasks.json
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -221,6 +221,11 @@ bench --site development.localhost install-app erpnext
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: Both frappe and erpnext must be on branch with same name. e.g. version-14
|
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
|
### Start Frappe without debugging
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
Note:
|
Note:
|
||||||
|
|
||||||
- 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.
|
- 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
|
```sh
|
||||||
docker-compose exec backend bench new-site --mariadb-user-host-login-scope=% --db-root-password <db-password> --admin-password <admin-password> <site-name>
|
docker-compose exec backend bench new-site --mariadb-user-host-login-scope=% --db-root-password <db-password> --admin-password <admin-password> <site-name>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/environment-variables.md
|
# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/environment-variables.md
|
||||||
|
|
||||||
ERPNEXT_VERSION=v15.53.0
|
ERPNEXT_VERSION=v15.61.0
|
||||||
|
|
||||||
DB_PASSWORD=123
|
DB_PASSWORD=123
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ RUN apt-get update \
|
||||||
libsasl2-dev \
|
libsasl2-dev \
|
||||||
libtiff5-dev \
|
libtiff5-dev \
|
||||||
libwebp-dev \
|
libwebp-dev \
|
||||||
|
pkg-config \
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rlwrap \
|
rlwrap \
|
||||||
tk8.6-dev \
|
tk8.6-dev \
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ RUN apt-get update \
|
||||||
libsasl2-dev \
|
libsasl2-dev \
|
||||||
libtiff5-dev \
|
libtiff5-dev \
|
||||||
libwebp-dev \
|
libwebp-dev \
|
||||||
|
pkg-config \
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rlwrap \
|
rlwrap \
|
||||||
tk8.6-dev \
|
tk8.6-dev \
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ RUN apt-get update \
|
||||||
libsasl2-dev \
|
libsasl2-dev \
|
||||||
libtiff5-dev \
|
libtiff5-dev \
|
||||||
libwebp-dev \
|
libwebp-dev \
|
||||||
|
pkg-config \
|
||||||
redis-tools \
|
redis-tools \
|
||||||
rlwrap \
|
rlwrap \
|
||||||
tk8.6-dev \
|
tk8.6-dev \
|
||||||
|
|
@ -121,7 +122,7 @@ FROM base AS erpnext
|
||||||
|
|
||||||
USER frappe
|
USER frappe
|
||||||
|
|
||||||
RUN echo "echo \"Commands restricted in prodution container, Read FAQ before you proceed: https://frappe.fyi/ctr-faq\"" >> ~/.bashrc
|
RUN echo "echo \"Commands restricted in prodution container, Read FAQ before you proceed: https://frappe.io/ctr-faq\"" >> ~/.bashrc
|
||||||
|
|
||||||
COPY --from=builder --chown=frappe:frappe /home/frappe/frappe-bench /home/frappe/frappe-bench
|
COPY --from=builder --chown=frappe:frappe /home/frappe/frappe-bench /home/frappe/frappe-bench
|
||||||
|
|
||||||
|
|
|
||||||
24
pwd.yml
24
pwd.yml
|
|
@ -2,8 +2,7 @@ version: "3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
backend:
|
backend:
|
||||||
image: frappe/erpnext:v15.53.0
|
image: frappe/erpnext:v15.61.0
|
||||||
platform: linux/amd64
|
|
||||||
networks:
|
networks:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
deploy:
|
deploy:
|
||||||
|
|
@ -19,8 +18,7 @@ services:
|
||||||
MARIADB_ROOT_PASSWORD: admin
|
MARIADB_ROOT_PASSWORD: admin
|
||||||
|
|
||||||
configurator:
|
configurator:
|
||||||
image: frappe/erpnext:v15.53.0
|
image: frappe/erpnext:v15.61.0
|
||||||
platform: linux/amd64
|
|
||||||
networks:
|
networks:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
deploy:
|
deploy:
|
||||||
|
|
@ -49,8 +47,7 @@ services:
|
||||||
- logs:/home/frappe/frappe-bench/logs
|
- logs:/home/frappe/frappe-bench/logs
|
||||||
|
|
||||||
create-site:
|
create-site:
|
||||||
image: frappe/erpnext:v15.53.0
|
image: frappe/erpnext:v15.61.0
|
||||||
platform: linux/amd64
|
|
||||||
networks:
|
networks:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
deploy:
|
deploy:
|
||||||
|
|
@ -105,8 +102,7 @@ services:
|
||||||
- db-data:/var/lib/mysql
|
- db-data:/var/lib/mysql
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: frappe/erpnext:v15.53.0
|
image: frappe/erpnext:v15.61.0
|
||||||
platform: linux/amd64
|
|
||||||
networks:
|
networks:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
@ -132,8 +128,7 @@ services:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
|
|
||||||
queue-long:
|
queue-long:
|
||||||
image: frappe/erpnext:v15.53.0
|
image: frappe/erpnext:v15.61.0
|
||||||
platform: linux/amd64
|
|
||||||
networks:
|
networks:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
deploy:
|
deploy:
|
||||||
|
|
@ -149,8 +144,7 @@ services:
|
||||||
- logs:/home/frappe/frappe-bench/logs
|
- logs:/home/frappe/frappe-bench/logs
|
||||||
|
|
||||||
queue-short:
|
queue-short:
|
||||||
image: frappe/erpnext:v15.53.0
|
image: frappe/erpnext:v15.61.0
|
||||||
platform: linux/amd64
|
|
||||||
networks:
|
networks:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
deploy:
|
deploy:
|
||||||
|
|
@ -184,8 +178,7 @@ services:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
image: frappe/erpnext:v15.53.0
|
image: frappe/erpnext:v15.61.0
|
||||||
platform: linux/amd64
|
|
||||||
networks:
|
networks:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
deploy:
|
deploy:
|
||||||
|
|
@ -199,8 +192,7 @@ services:
|
||||||
- logs:/home/frappe/frappe-bench/logs
|
- logs:/home/frappe/frappe-bench/logs
|
||||||
|
|
||||||
websocket:
|
websocket:
|
||||||
image: frappe/erpnext:v15.53.0
|
image: frappe/erpnext:v15.61.0
|
||||||
platform: linux/amd64
|
|
||||||
networks:
|
networks:
|
||||||
- frappe_network
|
- frappe_network
|
||||||
deploy:
|
deploy:
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
pytest==8.3.4
|
pytest==8.3.5
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue