Merge branch 'frappe:main' into main

This commit is contained in:
tobehn 2025-03-05 08:39:27 +01:00 committed by GitHub
commit f64954fe4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 48 additions and 15 deletions

View file

@ -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.5.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.5.0
with: with:
targets: bench targets: bench
push: true push: true

View file

@ -63,7 +63,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.5.0
with: with:
source: . source: .
push: true push: true
@ -92,6 +92,6 @@ jobs:
- name: Push - name: Push
if: ${{ inputs.push }} if: ${{ inputs.push }}
uses: docker/bake-action@v6.3.0 uses: docker/bake-action@v6.5.0
with: with:
push: true push: true

View file

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

View file

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

View file

@ -4,6 +4,7 @@ x-customizable-image: &customizable_image
# about using custom images. # about using custom images.
image: ${CUSTOM_IMAGE:-frappe/erpnext}:${CUSTOM_TAG:-$ERPNEXT_VERSION} image: ${CUSTOM_IMAGE:-frappe/erpnext}:${CUSTOM_TAG:-$ERPNEXT_VERSION}
pull_policy: ${PULL_POLICY:-always} pull_policy: ${PULL_POLICY:-always}
restart: ${RESTART_POLICY:-unless-stopped}
x-depends-on-configurator: &depends_on_configurator x-depends-on-configurator: &depends_on_configurator
depends_on: depends_on:
@ -39,6 +40,7 @@ services:
REDIS_QUEUE: ${REDIS_QUEUE:-} REDIS_QUEUE: ${REDIS_QUEUE:-}
SOCKETIO_PORT: 9000 SOCKETIO_PORT: 9000
depends_on: {} depends_on: {}
restart: on-failure
backend: backend:
<<: *backend_defaults <<: *backend_defaults

View file

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

View file

@ -88,6 +88,29 @@ Podman (the POD MANager) is a tool for managing containers and images, volumes m
- `bench new-site myerp.net --mariadb-root-password 123456 --admin-password 123123` - `bench new-site myerp.net --mariadb-root-password 123456 --admin-password 123123`
- `bench --site myerp.net install-app erpnext` - `bench --site myerp.net install-app erpnext`
## Autostart pod
- Systemd is the best option on autostart pods when the system boots. Create a unit file in either `/etc/systemd/system` [for root user] or `~/.config/systemd/user` [for non-root user]
```ruby
[Unit]
Description=Podman system daemon service
After=network-online.target
[Service]
#User=
#Group=
Type=oneshot
ExecStart=podman pod start POD_NAME
[Install]
WantedBy=default.target
```
**Note:** Replace POD_NAME with a created pod name while creating a pod. This is a basic systemd unit file to autostart pod, but multiple options can be used, refer to the man page for [systemd](https://man7.org/linux/man-pages/man1/init.1.html). For better management of containers, [Quadlet](https://docs.podman.io/en/v4.4/markdown/podman-systemd.unit.5.html) is the best option for ease of updating and tracing issues on each container.
## Troubleshoot ## Troubleshoot
- If there is a network issue while building the image, you need to remove caches and restart again - If there is a network issue while building the image, you need to remove caches and restart again

View file

@ -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.50.0 ERPNEXT_VERSION=v15.53.4
DB_PASSWORD=123 DB_PASSWORD=123

View file

@ -9,6 +9,7 @@ services:
proxy: proxy:
image: traefik:v2.11 image: traefik:v2.11
restart: unless-stopped
command: command:
- --providers.docker=true - --providers.docker=true
- --providers.docker.exposedbydefault=false - --providers.docker.exposedbydefault=false

View file

@ -13,6 +13,7 @@ services:
test: mysqladmin ping -h localhost --password=${DB_PASSWORD} test: mysqladmin ping -h localhost --password=${DB_PASSWORD}
interval: 1s interval: 1s
retries: 20 retries: 20
restart: unless-stopped
command: command:
- --character-set-server=utf8mb4 - --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci - --collation-server=utf8mb4_unicode_ci

View file

@ -9,9 +9,11 @@ services:
redis-cache: redis-cache:
image: redis:6.2-alpine image: redis:6.2-alpine
restart: unless-stopped
redis-queue: redis-queue:
image: redis:6.2-alpine image: redis:6.2-alpine
restart: unless-stopped
volumes: volumes:
- redis-queue-data:/data - redis-queue-data:/data

16
pwd.yml
View file

@ -2,7 +2,7 @@ version: "3"
services: services:
backend: backend:
image: frappe/erpnext:v15.50.0 image: frappe/erpnext:v15.53.4
networks: networks:
- frappe_network - frappe_network
deploy: deploy:
@ -18,7 +18,7 @@ services:
MARIADB_ROOT_PASSWORD: admin MARIADB_ROOT_PASSWORD: admin
configurator: configurator:
image: frappe/erpnext:v15.50.0 image: frappe/erpnext:v15.53.4
networks: networks:
- frappe_network - frappe_network
deploy: deploy:
@ -47,7 +47,7 @@ services:
- logs:/home/frappe/frappe-bench/logs - logs:/home/frappe/frappe-bench/logs
create-site: create-site:
image: frappe/erpnext:v15.50.0 image: frappe/erpnext:v15.53.4
networks: networks:
- frappe_network - frappe_network
deploy: deploy:
@ -102,7 +102,7 @@ services:
- db-data:/var/lib/mysql - db-data:/var/lib/mysql
frontend: frontend:
image: frappe/erpnext:v15.50.0 image: frappe/erpnext:v15.53.4
networks: networks:
- frappe_network - frappe_network
depends_on: depends_on:
@ -128,7 +128,7 @@ services:
- "8080:8080" - "8080:8080"
queue-long: queue-long:
image: frappe/erpnext:v15.50.0 image: frappe/erpnext:v15.53.4
networks: networks:
- frappe_network - frappe_network
deploy: deploy:
@ -144,7 +144,7 @@ services:
- logs:/home/frappe/frappe-bench/logs - logs:/home/frappe/frappe-bench/logs
queue-short: queue-short:
image: frappe/erpnext:v15.50.0 image: frappe/erpnext:v15.53.4
networks: networks:
- frappe_network - frappe_network
deploy: deploy:
@ -178,7 +178,7 @@ services:
condition: on-failure condition: on-failure
scheduler: scheduler:
image: frappe/erpnext:v15.50.0 image: frappe/erpnext:v15.53.4
networks: networks:
- frappe_network - frappe_network
deploy: deploy:
@ -192,7 +192,7 @@ services:
- logs:/home/frappe/frappe-bench/logs - logs:/home/frappe/frappe-bench/logs
websocket: websocket:
image: frappe/erpnext:v15.50.0 image: frappe/erpnext:v15.53.4
networks: networks:
- frappe_network - frappe_network
deploy: deploy:

View file

@ -1 +1 @@
pytest==8.3.4 pytest==8.3.5