Skip to content

Commit

Permalink
Rename env name.
Browse files Browse the repository at this point in the history
  • Loading branch information
tannguyen04 committed Jun 4, 2024
1 parent 044b9ce commit 8ca3566
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 65 deletions.
8 changes: 4 additions & 4 deletions .docker/cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ ENV DRUPAL_PRIVATE_FILES=${DRUPAL_PRIVATE_FILES}
ARG DRUPAL_TEMPORARY_FILES="${TMP:-/tmp}"
ENV DRUPAL_TEMPORARY_FILES=${DRUPAL_TEMPORARY_FILES}

ARG DRUPAL_CONFIG_DIRECTORY="/app/config/default"
ENV DRUPAL_CONFIG_DIRECTORY=${DRUPAL_CONFIG_DIRECTORY}
ARG DRUPAL_CONFIG_PATH="/app/config/default"
ENV DRUPAL_CONFIG_PATH=${DRUPAL_CONFIG_PATH}

# Set default values for environment variables.
# These values will be overridden if set in docker-compose.yml or .env file
Expand Down Expand Up @@ -98,8 +98,8 @@ RUN npm --prefix /app/${WEBROOT}/themes/custom/your_site_theme ci --no-audit --n
COPY . /app

# Create files directories and set correct permissions.
RUN mkdir -p "${DRUPAL_PUBLIC_FILES}" "${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" "${DRUPAL_CONFIG_DIRECTORY}" && \
chmod 0770 "${DRUPAL_PUBLIC_FILES}" "${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" "${DRUPAL_CONFIG_DIRECTORY}"
RUN mkdir -p "${DRUPAL_PUBLIC_FILES}" "${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" "${DRUPAL_CONFIG_PATH}" && \
chmod 0770 "${DRUPAL_PUBLIC_FILES}" "${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" "${DRUPAL_CONFIG_PATH}"

# Compile front-end assets. Running this after copying all files as we need
# sources to compile assets.
Expand Down
3 changes: 0 additions & 3 deletions .scaffold/docs/.utils/variables/extra/.env.variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,3 @@ DRUPAL_PRIVATE_FILES="${DRUPAL_PRIVATE_FILES:-${DRUPAL_PUBLIC_FILES}/private}"

# Path to temporary files.
DRUPAL_TEMPORARY_FILES="${DRUPAL_TEMPORARY_FILES:-${DRUPAL_PRIVATE_FILES}/tmp}"

# Path to sync config directory.
DRUPAL_CONFIG_DIRECTORY="${DRUPAL_CONFIG_DIRECTORY:-/app/config/default}"
8 changes: 0 additions & 8 deletions .scaffold/docs/content/workflows/variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1626,14 +1626,6 @@ Default value: `daemon`

Defined in: `.env`

### `DRUPAL_CONFIG_DIRECTORY`

Path to sync config directory.

Default value: `/app/config/default`

Defined in: `.env`

### `DRUPAL_CONFIG_PATH`

Path to configuration directory relative to the project root.<br />Auto-discovered from site's `settings.php` file if not set.
Expand Down
16 changes: 8 additions & 8 deletions .scaffold/tests/bats/fixtures/docker-compose.env.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -71,7 +71,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -120,7 +120,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -176,7 +176,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -213,7 +213,7 @@
"build": {
"args": {
"CLI_IMAGE": "star_wars",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_TEMPORARY_FILES": "/tmp",
Expand All @@ -233,7 +233,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -296,7 +296,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -369,7 +369,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down
16 changes: 8 additions & 8 deletions .scaffold/tests/bats/fixtures/docker-compose.env_local.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -71,7 +71,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -120,7 +120,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -176,7 +176,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -213,7 +213,7 @@
"build": {
"args": {
"CLI_IMAGE": "star_wars",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_TEMPORARY_FILES": "/tmp",
Expand All @@ -233,7 +233,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -296,7 +296,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down Expand Up @@ -369,7 +369,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "0",
Expand Down
16 changes: 8 additions & 8 deletions .scaffold/tests/bats/fixtures/docker-compose.env_mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -71,7 +71,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -120,7 +120,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -176,7 +176,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -213,7 +213,7 @@
"build": {
"args": {
"CLI_IMAGE": "the_matrix",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_TEMPORARY_FILES": "/tmp",
Expand All @@ -233,7 +233,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -296,7 +296,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down Expand Up @@ -369,7 +369,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "the_matrix.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "1",
Expand Down
16 changes: 8 additions & 8 deletions .scaffold/tests/bats/fixtures/docker-compose.noenv.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "",
Expand Down Expand Up @@ -71,7 +71,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "",
Expand Down Expand Up @@ -120,7 +120,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "",
Expand Down Expand Up @@ -176,7 +176,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "",
Expand Down Expand Up @@ -213,7 +213,7 @@
"build": {
"args": {
"CLI_IMAGE": "star_wars",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_TEMPORARY_FILES": "/tmp",
Expand All @@ -233,7 +233,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "",
Expand Down Expand Up @@ -296,7 +296,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "",
Expand Down Expand Up @@ -369,7 +369,7 @@
"environment": {
"CI": "true",
"DREVOPS_LOCALDEV_URL": "star_wars.docker.amazee.io",
"DRUPAL_CONFIG_DIRECTORY": "/app/config/default",
"DRUPAL_CONFIG_PATH": "/app/config/default",
"DRUPAL_PRIVATE_FILES": "/app/web/sites/default/files/private",
"DRUPAL_PUBLIC_FILES": "/app/web/sites/default/files",
"DRUPAL_REDIS_ENABLED": "",
Expand Down
2 changes: 1 addition & 1 deletion .scaffold/tests/bats/provision.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

load _helper.bash

export DRUPAL_CONFIG_DIRECTORY="/app/config/default"
export DRUPAL_CONFIG_PATH="/app/config/default"
export DRUPAL_PUBLIC_FILES="/app/web/sites/default/files"
export DRUPAL_PRIVATE_FILES="/app/web/sites/default/files/private"
export DRUPAL_TEMPORARY_FILES="/tmp"
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ x-environment: &default-environment
# Forward emails to Mailhog locally.
SSMTP_MAILHUB: ${SSMTP_MAILHUB:-host.docker.internal:1025}
# Drupal config directory
DRUPAL_CONFIG_DIRECTORY: ${DRUPAL_CONFIG_DIRECTORY:-/app/config/default}
DRUPAL_CONFIG_PATH: ${DRUPAL_CONFIG_PATH:-/app/config/default}
# Drupal file paths.
DRUPAL_PUBLIC_FILES: ${DRUPAL_PUBLIC_FILES:-/app/web/sites/default/files}
DRUPAL_PRIVATE_FILES: ${DRUPAL_PRIVATE_FILES:-/app/web/sites/default/files/private}
Expand Down Expand Up @@ -116,7 +116,7 @@ services:
args:
CLI_IMAGE: *cli-image
WEBROOT: "${DREVOPS_WEBROOT:-web}"
DRUPAL_CONFIG_DIRECTORY: ${DRUPAL_CONFIG_DIRECTORY:-/app/config/default}
DRUPAL_CONFIG_PATH: ${DRUPAL_CONFIG_PATH:-/app/config/default}
DRUPAL_PUBLIC_FILES: ${DRUPAL_PUBLIC_FILES:-/app/web/sites/default/files}
DRUPAL_PRIVATE_FILES: ${DRUPAL_PRIVATE_FILES:-/app/web/sites/default/files/private}
DRUPAL_TEMPORARY_FILES: ${DRUPAL_TEMPORARY_FILES:-/tmp}
Expand Down
1 change: 0 additions & 1 deletion scripts/drevops/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ note "Drupal core version : ${drupal_version}"
note "Drush version : ${drush_version}"
echo
note "Webroot path : $(pwd)/${DREVOPS_WEBROOT}"
note "Config directory : ${DRUPAL_CONFIG_DIRECTORY-<empty>}"
note "Public files path : ${DRUPAL_PUBLIC_FILES-<empty>}"
note "Private files path : ${DRUPAL_PRIVATE_FILES-<empty>}"
note "Temporary files path : ${DRUPAL_TEMPORARY_FILES-<empty>}"
Expand Down
Loading

1 comment on commit 8ca3566

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.