Skip to content

dev: APP_ENV sentinel "xxxxxxx" leaks into docker compose exec / swx console commands #230

Description

The dev image sets the sentinel APP_ENV=xxxxxxx in the Dockerfile, which /entrypoint unsets on container start so .env wins. That works for the supervisord processes — but docker compose exec bypasses the entrypoint, so the sentinel is still set there.

Since real env vars override .env in Symfony, every exec'd console command runs in an environment literally named xxxxxxx:

$ swx cache:clear
[OK] Cache for the "xxxxxxx" environment (debug=true) was successfully cleared.

$ docker compose exec web sh -c 'echo $APP_ENV'
xxxxxxx

This is more than cosmetic: shopware-cli project console / swx commands use var/cache/xxxxxxx_ while the web processes use var/cache/dev_ — e.g. cache:clear clears the wrong cache.

Image: ghcr.io/shopware/docker-dev:php8.5-node24-caddy (current build)

Workaround: set APP_ENV: dev explicitly in the compose environment: block.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions