diff --git a/.ddev/.env.pgov-example b/.ddev/.env.pgov-example index ba16a29c..cb2c4322 100644 --- a/.ddev/.env.pgov-example +++ b/.ddev/.env.pgov-example @@ -1,5 +1,17 @@ # Copy this file to `.env` and update the default values for PGOV development. +# +BASIC_AUTH_USER="admin" +BASIC_AUTH_PASSWORD="civicactions" + +# See https://next-drupal.org/docs/environment-variables +NEXT_PUBLIC_DRUPAL_BASE_URL=https://performance.ddev.site +NEXT_IMAGE_DOMAIN=performance.ddev.site + +# Authentication for the NextJS App +DRUPAL_CLIENT_ID= +DRUPAL_CLIENT_SECRET= + # Obtain a personal access token at https://airtable.com/create/tokens while # logged in as a sufficiently-permissioned user. # Scopes should include: diff --git a/.ddev/config.yaml b/.ddev/config.yaml index ef32fa0b..139b17ce 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -15,14 +15,25 @@ web_environment: - DRUSH_ALLOW_XDEBUG=1 corepack_enable: false web_extra_exposed_ports: + - name: "Next.js Front End" + container_port: 3000 + https_port: 3000 + http_port: 3001 - name: "Documentation" container_port: 4000 https_port: 4000 http_port: 4001 web_extra_daemons: + - name: "frontend" + command: "npm install && npm run dev -- -H 0.0.0.0 -p 3000" + directory: /var/www/html/src/frontend - name: "docs" command: "npm install && npm run start -- -h 0.0.0.0 -p 4000" directory: /var/www/html/docs +hooks: + # Ensure the .env file is present. + pre-start: + - exec-host: "(ls .ddev/.envs > /dev/null 2>error) || (cd .ddev && cp .env.pgov-example .env)" # Key features of DDEV's config.yaml: diff --git a/src/frontend/.env.example b/src/frontend/.env.example deleted file mode 100644 index 97aa6dae..00000000 --- a/src/frontend/.env.example +++ /dev/null @@ -1,8 +0,0 @@ -# See https://next-drupal.org/docs/environment-variables -NEXT_PUBLIC_DRUPAL_BASE_URL=http://performance.ddev.site -NEXT_IMAGE_DOMAIN=performance.ddev.site - -# Authentication -DRUPAL_CLIENT_ID= -DRUPAL_CLIENT_SECRET= -