子主题的资产在预构建的 Docker 中丢失 – Shopware 6.4 商店

huangapple go评论69阅读模式
英文:

Assets of childtheme missing in pre-built docker - Shopware 6.4 shop

问题

以下是翻译好的部分:

我们通过Docker托管商店并使用预构建的镜像:

CI=1 SHOPWARE_SKIP_THEME_COMPILE=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true DATABASE_URL= bin/build-storefront.sh


在构建容器中,没有可用的数据库,并将一切内容复制到生产容器中。

COPY --chown=www-data:www-data --from=build /var/www .


在启动生产容器时,我们编译主题:

bin/console theme:dump
bin/console theme:compile --keep-assets || true


这在大部分情况下是有效的,但我们发现`public/bundles/ourchildthme/assets`丢失,而图标和标志文件夹都在这里。

我们尝试在Docker生产容器中手动执行

bin/console assets:install


但它仍未复制。

如果我们执行`bin/build.sh`,它可以工作,但这显然不是预构建Docker容器的想法。

* 在流程的哪个部分应生成这个资源文件夹?
* 在流程中的哪个位置放置它 - 在预构建时还是在启动容器时?
英文:

We are hosting a Shop via docker and pre build the image with

CI=1 SHOPWARE_SKIP_THEME_COMPILE=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true DATABASE_URL= bin/build-storefront.sh

in build container without a database being available and copy everything to the production container.

COPY --chown=www-data:www-data --from=build /var/www .

When starting the production container we compile the theme:

bin/console theme:dump
bin/console theme:compile --keep-assets || true

This mostly works but we found out that public/bundles/ourchildthme/assets is missing, while icon und logo folders are here.

We tried to execute

bin/console assets:install

manually in the docker production container, but it is still not copied.

If we execute bin/build.sh it works, but of course this is not the idea of the pre-build docker container.

  • In which part of the process should this asset folder be generated?
  • Where to put it in the process - in the pre-building or when starting the container?

答案1

得分: 1

错误似乎是 --keep-assets

没有这个参数,它可以工作:

bin/console theme:compile || true

英文:

The mistake seems --keep-assets

Without this, it works:

bin/console theme:compile || true

huangapple
  • 本文由 发表于 2023年2月9日 00:41:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/75388966.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定