Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add symlink creation for PHP storage directory #7

Merged
merged 2 commits into from
May 13, 2024

Conversation

esolitos
Copy link
Contributor

@esolitos esolitos commented May 6, 2024

What

  1. Ensure the sites/default/files is a symlink to the permanent file storage.
  2. Ensure the /tmp/php path exists to use for twig compilation.

Why

Currently we create the symlink using the make -f /usr/local/bin/actions.mk init-drupal command when we start the container, which in our scenario does the same thing as we are doing here by calling the files_link command (from the init_drupal).
This is not great as it requires an additional step at deploy time, and since we always use the same setup we can hardcode this at build time instead of at run time.

Additional info

https://github.com/nymedia/akademika_d8/blob/develop/.github/workflows/container-images.yml#L19C1-L20C1

https://github.com/nymedia/github-shared-workflows/blob/1.x/.github/workflows/build-drupal-container-images.yml

Create a symlink for the PHP storage directory to avoid running script on container start. Also ensure directory ownership by webserver user.
@esolitos esolitos requested a review from a team May 6, 2024 12:43
@esolitos esolitos self-assigned this May 6, 2024
reuse the DRUPAL_FILES_DIR instead of appending "files" to DRUPAL_SITE_DIR
@esolitos esolitos merged commit 8e1183e into 1.x May 13, 2024
@esolitos esolitos deleted the update-drupal-php-storage-dir-ownership branch May 13, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant