Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

No-robots.sh entrypoint fails if using non-standard Drupal root. #130

Description

@grahamethompson

If /app/web is not being used as Drupal root, for example /app/docroot, no-robots.sh:7 fails to write robots.txt in non-production environments.

if [ ! "${LAGOON_ENVIRONMENT_TYPE}" == "production" ]; then
printf "User-agent: *\nDisallow: /\n" > /app/web/robots.txt
fi

[govcms7-paas]nginx:/app$ sh /lagoon/entrypoints/20-no-robots.sh 
/lagoon/entrypoints/20-no-robots.sh: line 7: can't create /app/web/robots.txt: nonexistent directory

Maybe doing something like this would help PaaS scallywags?

if [ ! "${LAGOON_ENVIRONMENT_TYPE}" == "production" ]; then
    printf "User-agent: *\nDisallow: /\n" > /"${APP_DIR:-app}"/"${WEBROOT:-web}"/robots.txt
fi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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