diff --git a/.github/workflows/build_bench.yml b/.github/workflows/build_bench.yml index 20aba1f3..f7bf4c09 100644 --- a/.github/workflows/build_bench.yml +++ b/.github/workflows/build_bench.yml @@ -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" - name: Build and test - uses: docker/bake-action@v6.3.0 + uses: docker/bake-action@v6.5.0 with: source: . targets: bench-test @@ -52,7 +52,7 @@ jobs: - name: Push 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: targets: bench push: true diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index ae4b1ece..8042a94c 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -63,7 +63,7 @@ jobs: echo "NODE_VERSION=${{ inputs.node_version }}" >> "$GITHUB_ENV" - name: Build - uses: docker/bake-action@v6.3.0 + uses: docker/bake-action@v6.5.0 with: source: . push: true @@ -92,6 +92,6 @@ jobs: - name: Push if: ${{ inputs.push }} - uses: docker/bake-action@v6.3.0 + uses: docker/bake-action@v6.5.0 with: push: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea9da109..5a1d6036 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,8 @@ repos: 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 diff --git a/README.md b/README.md index 269db059..39f843eb 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ After cloning the repo run this command to build multi-architecture images speci 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` Then run: `docker compose -f pwd.yml up -d` diff --git a/compose.yaml b/compose.yaml index 628de532..7c8e64f2 100644 --- a/compose.yaml +++ b/compose.yaml @@ -4,6 +4,7 @@ x-customizable-image: &customizable_image # 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: @@ -39,6 +40,7 @@ services: REDIS_QUEUE: ${REDIS_QUEUE:-} SOCKETIO_PORT: 9000 depends_on: {} + restart: on-failure backend: <<: *backend_defaults diff --git a/development/installer.py b/development/installer.py index f977b822..edd62147 100755 --- a/development/installer.py +++ b/development/installer.py @@ -207,6 +207,7 @@ def create_site_in_bench(args): 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=%", @@ -222,6 +223,7 @@ def create_site_in_bench(args): 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 diff --git a/docs/custom-apps-podman.md b/docs/custom-apps-podman.md index 58717e64..765b9b7d 100644 --- a/docs/custom-apps-podman.md +++ b/docs/custom-apps-podman.md @@ -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 --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 - If there is a network issue while building the image, you need to remove caches and restart again diff --git a/example.env b/example.env index 115f3eaf..80d6fd25 100644 --- a/example.env +++ b/example.env @@ -1,6 +1,6 @@ # 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 diff --git a/overrides/compose.https.yaml b/overrides/compose.https.yaml index 8d78602a..9096e560 100644 --- a/overrides/compose.https.yaml +++ b/overrides/compose.https.yaml @@ -9,6 +9,7 @@ services: proxy: image: traefik:v2.11 + restart: unless-stopped command: - --providers.docker=true - --providers.docker.exposedbydefault=false diff --git a/overrides/compose.mariadb.yaml b/overrides/compose.mariadb.yaml index 3dee180f..1d6e55c6 100644 --- a/overrides/compose.mariadb.yaml +++ b/overrides/compose.mariadb.yaml @@ -13,6 +13,7 @@ services: test: mysqladmin ping -h localhost --password=${DB_PASSWORD} interval: 1s retries: 20 + restart: unless-stopped command: - --character-set-server=utf8mb4 - --collation-server=utf8mb4_unicode_ci diff --git a/overrides/compose.redis.yaml b/overrides/compose.redis.yaml index a1b9b1f6..407ad9e1 100644 --- a/overrides/compose.redis.yaml +++ b/overrides/compose.redis.yaml @@ -9,9 +9,11 @@ services: redis-cache: image: redis:6.2-alpine + restart: unless-stopped redis-queue: image: redis:6.2-alpine + restart: unless-stopped volumes: - redis-queue-data:/data diff --git a/pwd.yml b/pwd.yml index d54c7fc6..390327c3 100644 --- a/pwd.yml +++ b/pwd.yml @@ -2,7 +2,7 @@ version: "3" services: backend: - image: frappe/erpnext:v15.50.0 + image: frappe/erpnext:v15.53.4 networks: - frappe_network deploy: @@ -18,7 +18,7 @@ services: MARIADB_ROOT_PASSWORD: admin configurator: - image: frappe/erpnext:v15.50.0 + image: frappe/erpnext:v15.53.4 networks: - frappe_network deploy: @@ -47,7 +47,7 @@ services: - logs:/home/frappe/frappe-bench/logs create-site: - image: frappe/erpnext:v15.50.0 + image: frappe/erpnext:v15.53.4 networks: - frappe_network deploy: @@ -102,7 +102,7 @@ services: - db-data:/var/lib/mysql frontend: - image: frappe/erpnext:v15.50.0 + image: frappe/erpnext:v15.53.4 networks: - frappe_network depends_on: @@ -128,7 +128,7 @@ services: - "8080:8080" queue-long: - image: frappe/erpnext:v15.50.0 + image: frappe/erpnext:v15.53.4 networks: - frappe_network deploy: @@ -144,7 +144,7 @@ services: - logs:/home/frappe/frappe-bench/logs queue-short: - image: frappe/erpnext:v15.50.0 + image: frappe/erpnext:v15.53.4 networks: - frappe_network deploy: @@ -178,7 +178,7 @@ services: condition: on-failure scheduler: - image: frappe/erpnext:v15.50.0 + image: frappe/erpnext:v15.53.4 networks: - frappe_network deploy: @@ -192,7 +192,7 @@ services: - logs:/home/frappe/frappe-bench/logs websocket: - image: frappe/erpnext:v15.50.0 + image: frappe/erpnext:v15.53.4 networks: - frappe_network deploy: diff --git a/requirements-test.txt b/requirements-test.txt index d197ada2..2c78728c 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1 +1 @@ -pytest==8.3.4 +pytest==8.3.5