diff --git a/frontend_addon/{{ cookiecutter.__folder_name }}/.eslintrc.js b/frontend_addon/{{ cookiecutter.__folder_name }}/.eslintrc.js index 5514adb..14b8fdf 100644 --- a/frontend_addon/{{ cookiecutter.__folder_name }}/.eslintrc.js +++ b/frontend_addon/{{ cookiecutter.__folder_name }}/.eslintrc.js @@ -1,6 +1,6 @@ const fs = require('fs'); const projectRootPath = __dirname; -const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry'); +const { AddonRegistry } = require('@plone/registry/addon-registry'); let coreLocation; if (fs.existsSync(`${projectRootPath}/core`)) @@ -8,9 +8,7 @@ if (fs.existsSync(`${projectRootPath}/core`)) else if (fs.existsSync(`${projectRootPath}/../../core`)) coreLocation = `${projectRootPath}/../../core`; -const registry = new AddonConfigurationRegistry( - `${coreLocation}/packages/volto`, -); +const { registry } = AddonRegistry.init(`${coreLocation}/packages/volto`); // Extends ESlint configuration for adding the aliases to `src` directories in Volto addons const addonAliases = Object.keys(registry.packages).map((o) => [ diff --git a/frontend_addon/{{ cookiecutter.__folder_name }}/.storybook/main.js b/frontend_addon/{{ cookiecutter.__folder_name }}/.storybook/main.js index 1b15d3b..89f2668 100644 --- a/frontend_addon/{{ cookiecutter.__folder_name }}/.storybook/main.js +++ b/frontend_addon/{{ cookiecutter.__folder_name }}/.storybook/main.js @@ -107,9 +107,9 @@ module.exports = { [], defaultRazzleOptions, ); - const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry'); + const { AddonRegistry } = require('@plone/registry/addon-registry'); - const registry = new AddonConfigurationRegistry(projectRootPath); + const { registry } = AddonRegistry.init(projectRootPath); config = lessPlugin({ registry }).modifyWebpackConfig({ env: { target: 'web', dev: 'dev' }, diff --git a/frontend_addon/{{ cookiecutter.__folder_name }}/Makefile b/frontend_addon/{{ cookiecutter.__folder_name }}/Makefile index a6c7a6d..0f23807 100644 --- a/frontend_addon/{{ cookiecutter.__folder_name }}/Makefile +++ b/frontend_addon/{{ cookiecutter.__folder_name }}/Makefile @@ -50,10 +50,10 @@ start: ## Starts Volto, allowing reloading of the add-on during development build: ## Build a production bundle for distribution of the project with the add-on pnpm build -core/packages/registry/dist: core/packages/registry/src +core/packages/registry/dist: $(shell find core/packages/registry/src -type f) pnpm --filter @plone/registry build -core/packages/components/dist: core/packages/components/src +core/packages/components/dist: $(shell find core/packages/components/src -type f) pnpm --filter @plone/components build .PHONY: build-deps diff --git a/frontend_addon/{{ cookiecutter.__folder_name }}/package.json b/frontend_addon/{{ cookiecutter.__folder_name }}/package.json index 1bc72b8..4178d25 100644 --- a/frontend_addon/{{ cookiecutter.__folder_name }}/package.json +++ b/frontend_addon/{{ cookiecutter.__folder_name }}/package.json @@ -40,5 +40,11 @@ "devDependencies": { "mrs-developer": "{{ cookiecutter.__version_mrs_developer }}" }, + "pnpm": { + "overrides": { + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15", + "react-refresh": "^0.14.2" + } + }, "packageManager": "pnpm@{{ cookiecutter.__version_pnpm }}" } diff --git a/frontend_addon/{{ cookiecutter.__folder_name }}/packages/{{ cookiecutter.frontend_addon_name }}/.release-it.json b/frontend_addon/{{ cookiecutter.__folder_name }}/packages/{{ cookiecutter.frontend_addon_name }}/.release-it.json index 9ef4f97..4cde54e 100644 --- a/frontend_addon/{{ cookiecutter.__folder_name }}/packages/{{ cookiecutter.frontend_addon_name }}/.release-it.json +++ b/frontend_addon/{{ cookiecutter.__folder_name }}/packages/{{ cookiecutter.frontend_addon_name }}/.release-it.json @@ -1,4 +1,7 @@ { + "plugins": { + "../../core/packages/scripts/prepublish.js": {} + }, "hooks": { "after:bump": [ "pipx run towncrier build --draft --yes --version ${version} > .changelog.draft", @@ -9,6 +12,9 @@ ], "after:release": "rm .changelog.draft README.md" }, + "npm": { + "publish": false + }, "git": { "changelog": "pipx run towncrier build --draft --yes --version 0.0.0", "requireUpstream": false, diff --git a/project/cookiecutter.json b/project/cookiecutter.json index 5dd4421..cebdb8a 100644 --- a/project/cookiecutter.json +++ b/project/cookiecutter.json @@ -39,6 +39,7 @@ "__python_package_name_upper": "{{ cookiecutter.python_package_name | pascal_case }}", "__node_version": "{{ cookiecutter.volto_version | node_version_for_volto }}", "__version_plone_volto": "{{ cookiecutter.volto_version }}", + "__version_pnpm": "9.1.1", "__container_registry_prefix": "{{ cookiecutter.container_registry | image_prefix }}", "__container_image_prefix": "{{ cookiecutter.__container_registry_prefix }}{{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}", "__profile_version": "{% now 'utc', '%Y%m%d001' %}", @@ -61,12 +62,13 @@ "__devops_host": "{{ cookiecutter.hostname | extract_host }}", "__devops_compose_name": "{{ cookiecutter.project_slug | replace('.','-') | replace('_','-') }}", "__devops_stack_name": "{{ cookiecutter.hostname | replace('.','-') | replace('_','-') }}", - "__devops_swarm_public_network": "nw-internal", - "__devops_traefik_version": "v2.10", + "__devops_swarm_public_network": "nw-public", + "__devops_swarm_stack_network": "nw-internal", + "__devops_traefik_version": "v2.11", "__devops_traefik_local_include_ui": "yes", "__devops_traefik_stack_include_ui": "no", - "__devops_traefik_docker_network": "{{ cookiecutter.__devops_stack_name }}_{{ cookiecutter.__devops_swarm_public_network }}", - "__devops_varnish_version": "7.4", + "__devops_traefik_docker_network": "{{ cookiecutter.__devops_stack_name }}_{{ cookiecutter.__devops_swarm_stack_network }}", + "__devops_varnish_version": "7.6", "__devops_db_version": "14", "__devops_db_password": "{{ random_ascii_string(12) }}", "__backend_addon_format": "1", @@ -126,8 +128,7 @@ "devops/playbooks", "devops/requirements", "devops/tasks", - "devops/inventory/group_vars/all/users.yml", - "devops/inventory/group_vars/all/projects.yml" + "devops/inventory/group_vars/all/users.yml" ], "_extensions": [ diff --git a/project/tests/test_project_devops.py b/project/tests/test_project_devops.py index a5f012c..0a06acd 100644 --- a/project/tests/test_project_devops.py +++ b/project/tests/test_project_devops.py @@ -90,3 +90,10 @@ def test_project_devops_no_gha_deploy( folder = cutter_result_devops_no_gha_deploy.project_path path = folder / filepath assert path.exists() is False + + +def test_ansible_inventory_projects_replacement(cutter_result): + """Test GHA deploy files are not present.""" + folder = cutter_result.project_path + path = folder / "devops/inventory/group_vars/all/projects.yml" + assert "{{ cookiecutter.hostname }}" not in path.read_text() diff --git a/project/{{ cookiecutter.__folder_name }}/.github/workflows/backend.yml b/project/{{ cookiecutter.__folder_name }}/.github/workflows/backend.yml index 2f2430d..dc1cb8b 100644 --- a/project/{{ cookiecutter.__folder_name }}/.github/workflows/backend.yml +++ b/project/{{ cookiecutter.__folder_name }}/.github/workflows/backend.yml @@ -29,6 +29,8 @@ jobs: black: runs-on: ubuntu-latest + needs: + - meta steps: - name: Checkout codebase uses: actions/checkout@{{ cookiecutter.__gha_version_checkout }} @@ -41,6 +43,8 @@ jobs: flake8: runs-on: ubuntu-latest + needs: + - meta steps: - name: Checkout codebase uses: actions/checkout@{{ cookiecutter.__gha_version_checkout }} @@ -53,6 +57,8 @@ jobs: isort: runs-on: ubuntu-latest + needs: + - meta steps: - name: Checkout codebase uses: actions/checkout@{{ cookiecutter.__gha_version_checkout }} @@ -65,6 +71,8 @@ jobs: zpretty: runs-on: ubuntu-latest + needs: + - meta steps: - name: Checkout codebase uses: actions/checkout@{{ cookiecutter.__gha_version_checkout }} @@ -105,6 +113,7 @@ jobs: release: runs-on: ubuntu-latest needs: + - meta - black - flake8 - isort @@ -162,3 +171,5 @@ jobs: push: {{"${{ github.event_name != 'pull_request' }}"}} tags: {{"${{ steps.meta.outputs.tags }}"}} labels: {{"${{ steps.meta.outputs.labels }}"}} + build-args: | + PLONE_VERSION={{"${{ needs.meta.outputs.PLONE_VERSION }}"}} diff --git a/project/{{ cookiecutter.__folder_name }}/.github/workflows/frontend.yml b/project/{{ cookiecutter.__folder_name }}/.github/workflows/frontend.yml index e25c777..df9054a 100644 --- a/project/{{ cookiecutter.__folder_name }}/.github/workflows/frontend.yml +++ b/project/{{ cookiecutter.__folder_name }}/.github/workflows/frontend.yml @@ -29,7 +29,7 @@ jobs: id: vars run: | echo 'BASE_TAG=sha-$(git rev-parse --short HEAD)' >> $GITHUB_OUTPUT - python3 -c 'import json; data = json.load(open("./mrs.developer.json")); print("VOLTO_VERSION=" + data["core"].get("tag") or "latest")' >> $GITHUB_OUTPUT + python3 -c 'import json; data = json.load(open("./mrs.developer.json")); print("VOLTO_VERSION=" + (data["core"].get("tag") or "latest"))' >> $GITHUB_OUTPUT - name: Test vars run: | echo 'BASE_TAG={{"${{ steps.vars.outputs.BASE_TAG }}"}}' diff --git a/project/{{ cookiecutter.__folder_name }}/.vscode/settings.json b/project/{{ cookiecutter.__folder_name }}/.vscode/settings.json index 04f8089..1744666 100644 --- a/project/{{ cookiecutter.__folder_name }}/.vscode/settings.json +++ b/project/{{ cookiecutter.__folder_name }}/.vscode/settings.json @@ -1,5 +1,7 @@ { "eslint.workingDirectories": ["./frontend"], "flake8.cwd": "${workspaceFolder}/backend", - "flake8.args": ["--config=pyproject.toml"] + "flake8.args": ["--config=pyproject.toml"], + "black-formatter.cwd": "${workspaceFolder}/backend", + "isort.args": ["--settings-path=${workspaceFolder}/backend/pyproject.toml"] } diff --git a/project/{{ cookiecutter.__folder_name }}/Makefile b/project/{{ cookiecutter.__folder_name }}/Makefile index 32f680e..bf933c9 100644 --- a/project/{{ cookiecutter.__folder_name }}/Makefile +++ b/project/{{ cookiecutter.__folder_name }}/Makefile @@ -135,7 +135,7 @@ stack-create-site: ## Local Stack: Create a new site @echo "Create a new site in the local Docker stack" @docker compose -f docker-compose.yml exec backend ./docker-entrypoint.sh create-site -.PHONY: start-ps +.PHONY: stack-status stack-status: ## Local Stack: Check Status @echo "Check the status of the local Docker stack" @docker compose -f docker-compose.yml ps @@ -154,29 +154,29 @@ stack-rm: ## Local Stack: Remove Services and Volumes ## Acceptance .PHONY: acceptance-backend-dev-start -acceptance-backend-dev-start: ## Build Acceptance Servers - @echo "Build acceptance backend" +acceptance-backend-dev-start: + @echo "Start acceptance backend" $(MAKE) -C "./backend/" acceptance-backend-start .PHONY: acceptance-frontend-dev-start -acceptance-frontend-dev-start: ## Build Acceptance Servers - @echo "Build acceptance backend" +acceptance-frontend-dev-start: + @echo "Start acceptance frontend" $(MAKE) -C "./frontend/" acceptance-frontend-dev-start .PHONY: acceptance-test -acceptance-test: ## Start Acceptance tests in interactive mode - @echo "Build acceptance backend" +acceptance-test: + @echo "Start acceptance tests in interactive mode" $(MAKE) -C "./frontend/" acceptance-test # Build Docker images .PHONY: acceptance-frontend-image-build -acceptance-frontend-image-build: ## Build Acceptance frontend server image - @echo "Build acceptance frontend" +acceptance-frontend-image-build: + @echo "Build acceptance frontend image" @docker build frontend -t {{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}-frontend:acceptance -f frontend/Dockerfile --build-arg VOLTO_VERSION=$(VOLTO_VERSION) .PHONY: acceptance-backend-image-build -acceptance-backend-image-build: ## Build Acceptance backend server image - @echo "Build acceptance backend" +acceptance-backend-image-build: + @echo "Build acceptance backend image" @docker build backend -t {{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}-backend:acceptance -f backend/Dockerfile.acceptance --build-arg PLONE_VERSION=$(PLONE_VERSION) .PHONY: acceptance-images-build @@ -185,12 +185,12 @@ acceptance-images-build: ## Build Acceptance frontend/backend images $(MAKE) acceptance-frontend-image-build .PHONY: acceptance-frontend-container-start -acceptance-frontend-container-start: ## Start Acceptance frontend container +acceptance-frontend-container-start: @echo "Start acceptance frontend" @docker run --rm -p 3000:3000 --name {{ cookiecutter.project_slug }}-frontend-acceptance --link {{ cookiecutter.project_slug }}-backend-acceptance:backend -e RAZZLE_API_PATH=http://localhost:55001/plone -e RAZZLE_INTERNAL_API_PATH=http://backend:55001/plone -d {{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}-frontend:acceptance .PHONY: acceptance-backend-container-start -acceptance-backend-container-start: ## Start Acceptance backend container +acceptance-backend-container-start: @echo "Start acceptance backend" @docker run --rm -p 55001:55001 --name {{ cookiecutter.project_slug }}-backend-acceptance -d {{ cookiecutter.github_organization }}/{{ cookiecutter.project_slug }}-backend:acceptance @@ -206,7 +206,8 @@ acceptance-containers-stop: ## Stop Acceptance containers @docker stop {{ cookiecutter.project_slug }}-backend-acceptance .PHONY: ci-acceptance-test -ci-acceptance-test: ## Run Acceptance tests in ci mode +ci-acceptance-test: + @echo "Run acceptance tests in CI mode" $(MAKE) acceptance-containers-start pnpm dlx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000 $(MAKE) -C "./frontend/" ci-acceptance-test diff --git a/project/{{ cookiecutter.__folder_name }}/devops/.env_dist b/project/{{ cookiecutter.__folder_name }}/devops/.env_dist index 0f5b59e..63f175e 100644 --- a/project/{{ cookiecutter.__folder_name }}/devops/.env_dist +++ b/project/{{ cookiecutter.__folder_name }}/devops/.env_dist @@ -1,3 +1,4 @@ +ANSIBLE_REMOTE_PORT=22 DEPLOY_ENV=prod DEPLOY_HOST={{ cookiecutter.hostname }} DEPLOY_PORT=22 diff --git a/project/{{ cookiecutter.__folder_name }}/devops/Makefile b/project/{{ cookiecutter.__folder_name }}/devops/Makefile index 54a5cd7..7c505b1 100644 --- a/project/{{ cookiecutter.__folder_name }}/devops/Makefile +++ b/project/{{ cookiecutter.__folder_name }}/devops/Makefile @@ -118,6 +118,11 @@ stack-logs-backend: ## Display backend logs @echo "$(GREEN)==> Stack $(STACK_NAME): Logs for backend in context $(DEPLOY_ENV) $(RESET)" ${DOCKER_CMD_CONTEXT} service logs $(STACK_NAME)_backend +.PHONY: stack-logs-db +stack-logs-db: ## Display db logs + @echo "$(GREEN)==> Stack $(STACK_NAME): Logs for db in context $(DEPLOY_ENV) $(RESET)" + ${DOCKER_CMD_CONTEXT} service logs $(STACK_NAME)_db + .PHONY: stack-scale-services stack-scale-services: ## Scale services @echo "$(GREEN)==> Stack $(STACK_NAME): Scaling Frontend and Backend to $(DEPLOY_SCALES) in context $(DEPLOY_ENV) $(RESET)" diff --git a/project/{{ cookiecutter.__folder_name }}/devops/README.md b/project/{{ cookiecutter.__folder_name }}/devops/README.md index 0b96393..0b97b56 100644 --- a/project/{{ cookiecutter.__folder_name }}/devops/README.md +++ b/project/{{ cookiecutter.__folder_name }}/devops/README.md @@ -41,10 +41,12 @@ cp .env_dist .env Edit the `.env` file to suit your environment. For example: ``` +ANSIBLE_REMOTE_PORT=22 DEPLOY_ENV=prod DEPLOY_HOST={{ cookiecutter.hostname }} DEPLOY_PORT=22 DEPLOY_USER=plone +DEPLOY_FOLDER=/srv/{{ cookiecutter.project_slug }}/data DOCKER_CONFIG=.docker STACK_NAME={{ cookiecutter.__devops_stack_name }} ``` diff --git a/project/{{ cookiecutter.__folder_name }}/devops/inventory/group_vars/all/projects.yml b/project/{{ cookiecutter.__folder_name }}/devops/inventory/group_vars/all/projects.yml index d999251..50a4b4f 100644 --- a/project/{{ cookiecutter.__folder_name }}/devops/inventory/group_vars/all/projects.yml +++ b/project/{{ cookiecutter.__folder_name }}/devops/inventory/group_vars/all/projects.yml @@ -1,7 +1,7 @@ --- project_folders: # Path to store {{ cookiecutter.hostname }} postgres data - path: "{{ lookup('ansible.builtin.env', 'DEPLOY_FOLDER', default='/srv/plone/data') }}" + - path: {{ "\"{{ lookup('ansible.builtin.env', 'DEPLOY_FOLDER', default='/srv/plone/data') }}\"" }} owner: 999 group: 999 mode: "0750" diff --git a/project/{{ cookiecutter.__folder_name }}/devops/stacks/{{ cookiecutter.hostname }}.yml b/project/{{ cookiecutter.__folder_name }}/devops/stacks/{{ cookiecutter.hostname }}.yml index 0433eb8..3c63677 100644 --- a/project/{{ cookiecutter.__folder_name }}/devops/stacks/{{ cookiecutter.hostname }}.yml +++ b/project/{{ cookiecutter.__folder_name }}/devops/stacks/{{ cookiecutter.hostname }}.yml @@ -79,6 +79,7 @@ services: networks: - {{ cookiecutter.__devops_swarm_public_network }} + - {{ cookiecutter.__devops_swarm_stack_network }} {%- if cookiecutter.devops_cache == '1' %} @@ -89,7 +90,7 @@ services: PURGER_SERVICE_PORT: 80 PURGER_PUBLIC_SITES: "['{{ cookiecutter.hostname }}']" networks: - - {{ cookiecutter.__devops_swarm_public_network }} + - {{ cookiecutter.__devops_swarm_stack_network }} deploy: replicas: 2 update_config: @@ -115,7 +116,7 @@ services: - frontend - backend networks: - - {{ cookiecutter.__devops_swarm_public_network }} + - {{ cookiecutter.__devops_swarm_stack_network }} deploy: replicas: 1 update_config: @@ -150,6 +151,7 @@ services: - backend networks: - {{ cookiecutter.__devops_swarm_public_network }} + - {{ cookiecutter.__devops_swarm_stack_network }} deploy: replicas: 2 update_config: @@ -189,6 +191,7 @@ services: - db networks: - {{ cookiecutter.__devops_swarm_public_network }} + - {{ cookiecutter.__devops_swarm_stack_network }} deploy: replicas: 2 update_config: @@ -251,17 +254,19 @@ services: volumes: - vol-site-data:/var/lib/postgresql/data networks: - - {{ cookiecutter.__devops_swarm_public_network }} + - {{ cookiecutter.__devops_swarm_stack_network }} volumes: vol-traefik-certs: {} vol-site-data: driver_opts: type: none - device: "${DEPLOY_FOLDER:/srv/{{ cookiecutter.project_slug }}/data}" + device: ${DEPLOY_FOLDER:-/srv/{{ cookiecutter.project_slug }}/data} o: bind networks: {{ cookiecutter.__devops_swarm_public_network }}: + external: true + {{ cookiecutter.__devops_swarm_stack_network }}: internal: true driver: overlay diff --git a/project/{{ cookiecutter.__folder_name }}/devops/tasks/swarm/task_swarm.yml b/project/{{ cookiecutter.__folder_name }}/devops/tasks/swarm/task_swarm.yml index 7fd55d0..50b1abd 100644 --- a/project/{{ cookiecutter.__folder_name }}/devops/tasks/swarm/task_swarm.yml +++ b/project/{{ cookiecutter.__folder_name }}/devops/tasks/swarm/task_swarm.yml @@ -11,7 +11,31 @@ advertise_addr: "{{ swarm.advertise_addr }}" register: swarm_info +- name: "Docker Swarm: Set public network" + become: true + become_user: "{{ users.default.name }}" + block: + - name: "Docker Swarm: Check for public network" + community.docker.docker_network_info: + name: "{{ cookiecutter.__devops_swarm_public_network }}" + register: docker_swarm_net_public + + - name: "Docker Swarm: Create public network" + community.docker.docker_network: + name: "{{ cookiecutter.__devops_swarm_public_network }}" + internal: false + attachable: true + driver: overlay + driver_options: + "com.docker.network.driver.mtu": "{{ docker.network.mtu }}" + when: not docker_swarm_net_public.exists + - name: "Docker Swarm: Purge data" + become: true + become_user: "{{ users.default.name }}" + tags: + - cron + - swarm block: - name: "Docker Swarm: Purge old containers" ansible.builtin.cron: @@ -34,7 +58,3 @@ hour: "*" minute: 15 state: present - become_user: "{{ users.default.name }}" - tags: - - cron - - swarm diff --git a/sub/cache/cookiecutter.json b/sub/cache/cookiecutter.json index 4415f5a..c77b572 100644 --- a/sub/cache/cookiecutter.json +++ b/sub/cache/cookiecutter.json @@ -21,7 +21,7 @@ "__gha_version_docker_buildx": "v3", "__gha_version_docker_login": "v3", "__gha_version_docker_build_push": "v4", - "__devops_varnish_version": "7.4", + "__devops_varnish_version": "7.6", "_copy_without_render": [ ], "_extensions": [ diff --git a/sub/frontend_project/{{ cookiecutter.__folder_name }}/_project_files/Makefile b/sub/frontend_project/{{ cookiecutter.__folder_name }}/_project_files/Makefile index 720c097..333a63f 100644 --- a/sub/frontend_project/{{ cookiecutter.__folder_name }}/_project_files/Makefile +++ b/sub/frontend_project/{{ cookiecutter.__folder_name }}/_project_files/Makefile @@ -44,10 +44,10 @@ start: ## Starts Volto, allowing reloading of the add-on during development build: ## Build a production bundle for distribution of the project with the add-on pnpm build -core/packages/registry/dist: core/packages/registry/src +core/packages/registry/dist: $(shell find core/packages/registry/src -type f) pnpm --filter @plone/registry build -core/packages/components/dist: core/packages/components/src +core/packages/components/dist: $(shell find core/packages/components/src -type f) pnpm --filter @plone/components build .PHONY: build-deps diff --git a/sub/frontend_project/{{ cookiecutter.__folder_name }}/_project_files/package.json b/sub/frontend_project/{{ cookiecutter.__folder_name }}/_project_files/package.json index 610e7c1..d0624d3 100644 --- a/sub/frontend_project/{{ cookiecutter.__folder_name }}/_project_files/package.json +++ b/sub/frontend_project/{{ cookiecutter.__folder_name }}/_project_files/package.json @@ -38,5 +38,11 @@ "devDependencies": { "mrs-developer": "^2.2.0" }, + "pnpm": { + "overrides": { + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15", + "react-refresh": "^0.14.2" + } + }, "packageManager": "pnpm@9.1.1" } diff --git a/sub/project_settings/cookiecutter.json b/sub/project_settings/cookiecutter.json index fe9d560..e2d66fd 100644 --- a/sub/project_settings/cookiecutter.json +++ b/sub/project_settings/cookiecutter.json @@ -19,6 +19,7 @@ "__package_namespace": "{{ cookiecutter.python_package_name | package_namespace }}", "__profile_language": "{{ cookiecutter.language_code|gs_language_code }}", "__locales_language": "{{ cookiecutter.language_code|locales_language_code }}", + "__version_pnpm": "9.1.1", "_copy_without_render": [], "_extensions": [ "cookieplone.filters.use_prerelease_versions", diff --git a/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile b/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile index 19e753f..cb9d5d0 100644 --- a/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile +++ b/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PLONE_VERSION={{ cookiecutter.plone_version }} -FROM plone/server-builder:${PLONE_VERSION} as builder +FROM plone/server-builder:${PLONE_VERSION} AS builder WORKDIR /app diff --git a/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile.acceptance b/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile.acceptance index 0dbd904..7e7f05f 100644 --- a/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile.acceptance +++ b/sub/project_settings/{{ cookiecutter.__folder_name }}/backend/Dockerfile.acceptance @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PLONE_VERSION={{ cookiecutter.plone_version }} -FROM plone/server-builder:${PLONE_VERSION} as builder +FROM plone/server-builder:${PLONE_VERSION} AS builder WORKDIR /app diff --git a/sub/project_settings/{{ cookiecutter.__folder_name }}/frontend/Dockerfile b/sub/project_settings/{{ cookiecutter.__folder_name }}/frontend/Dockerfile index f4c1ba5..41a2c5c 100644 --- a/sub/project_settings/{{ cookiecutter.__folder_name }}/frontend/Dockerfile +++ b/sub/project_settings/{{ cookiecutter.__folder_name }}/frontend/Dockerfile @@ -1,17 +1,18 @@ # syntax=docker/dockerfile:1 ARG VOLTO_VERSION -FROM plone/frontend-builder:${VOLTO_VERSION} as builder +FROM plone/frontend-builder:${VOLTO_VERSION} AS builder COPY --chown=node packages/{{cookiecutter.frontend_addon_name}} /app/packages/{{cookiecutter.frontend_addon_name}} COPY --chown=node volto.config.js /app/ COPY --chown=node package.json /app/package.json.temp RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store,uid=1000 <