8000 GitHub - ph-One/next-build: Front-end templating, build, and deploy for VA.gov CMS content.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Front-end templating, build, and deploy for VA.gov CMS content.

License

Notifications You must be signed in to change notification settings

ph-One/next-build

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-build

Front-end templating, build, and deploy for VA.gov CMS content.

Local setup

Prerequisites

You should set these up before attempting to install the repo.

< 7099 h2 tabindex="-1" class="heading-element" dir="auto">Basic local installation
  1. Clone the repo if you haven't. git@github.com:department-of-veterans-affairs/next-build.git

  2. Clone the vets-website repo adjacent to next-build in the same parent directory. git@github.com:department-of-veterans-affairs/vets-website.git

  3. In vets-website, set node and yarn to the required versions: nvm use 14.15.0 && yarn set version 1.19.1

  4. yarn install and yarn build. You are now done in vets-website.

  5. In the next-build directory, nvm use 18 && yarn set version stable

  6. Run yarn install.

  7. Copy envs/.env.example to envs/.env.local. This is a reasonable set of environment defaults for local development.

  8. Make sure your SOCKS access is running. (e.g. vtk socks on)

  9. Run yarn dev.

You will now have a Next.js development server running at http://localhost:3000, which will refresh with changes to your local environment.

Environment Flags

The APP_ENV flag can be used to designate which .env file you want to use. Ensure your env files are in ./envs, and then run your build or dev command with a leading APP_ENV=local.

ie APP_ENV=local yarn dev

Ensure the value passed into APP_ENV matches the file name of the .env file you wish to use.

If no value is passed .env.local will be used as the default

Local CMS endpoint

To use the local CMS as an endpoint, follow the install directions for the CMS repo here.

While installing those dependencies, you will run mkcert -install. This certificate is used by ddev, and also needs to be used by next-build to enable connections over https:// locally.

Steps to do so: mkcert -CAROOT to find where the rootCA.pem was installed cp the/above/directory/rootCA.pem path/to/next-build/certs/rootCA.pem

This certificate should be git ignored by default. In your .env.local file, update the endpoints to:

# This is the standard lower environment for Content API.
#NEXT_PUBLIC_DRUPAL_BASE_URL=https://content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov
#NEXT_IMAGE_DOMAIN=https://content-build-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov

# If running va.gov-cms locally
NEXT_PUBLIC_DRUPAL_BASE_URL=https://va-gov-cms.ddev.site
NEXT_IMAGE_DOMAIN=https://va-gov-cms.ddev.site

Now you can run yarn dev and data will be coming from your local CMS environment instead.

Documentation (WIP)

About

Front-end templating, build, and deploy for VA.gov CMS content.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.7%
  • JavaScript 10.9%
  • Other 1.4%
0