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

WIP: Include front end in ddev configuration #74

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .ddev/.env.pgov-example
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
11 changes: 11 additions & 0 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
8 changes: 0 additions & 8 deletions src/frontend/.env.example

This file was deleted.