Skip to content

Persisting the env.php file #54

@mikeymike

Description

@mikeymike

Today @AydinHassan hit a weird bug that was potentially caused by the fact we have a full named volume for the app/etc directory.

Volumes will happily mount over the files in the image and thus if a file is somehow removed from the volume it will cause that file to not exists in later rebuilds until you recreate it yourself after the volume is mounted.

We have this volume purely to persist the env.php file. So we need to better approach at persisting the single configuration file that doesn't impact other files in the directory.

Possible solutions were discussed

  1. Single file volume.. not possible because it's a Linux only feature 😭
  2. Copy from local filesystem.

Solution proposed...

  1. On workflow install command/s ensure the env.php file is pulled back to the local FS.
  2. Remove env related volumes (might be Selco specific until backported if not already)
  3. Subsequent builds will copy the file in on the COPY app app command

Caveat to this is that the user is then responsible for ensuring that file stays persisted, if they delete it they will need to recover it, recreate it or re-install Magento to generate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions