Skip to content

Commit

Permalink
Merge branch 'main' into VACMS-14342-Set-up-CODEOWNERS
Browse files Browse the repository at this point in the history
  • Loading branch information
ndouglas authored Oct 30, 2023
2 parents 0438bdf + 21047f3 commit c478d34
Show file tree
Hide file tree
Showing 108 changed files with 3,668 additions and 1,074 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Public Websites Epic
about: A epic for the Public Websites team.
name: Sitewide Epic - Web Governance Board
about: Epic template for Sitewide projects that need to be publicized in the Web Governance Board project view, for Public Websites and Facilities teams.
title: ""
labels: Epic, Public Websites
labels: Epic
assignees: ''

---
Expand All @@ -18,7 +18,7 @@ assignees: ''
## Headlines
**VA stakeholders** -

**OCTO lead** - Dave Conlon
**OCTO lead** -

**Is this project tracked to an upcoming event or congressional deadline?** -

Expand All @@ -30,7 +30,7 @@ assignees: ''

**What is the user impact and scale of impact?** -

**Who would manage this product long term?** - Public Websites
**Who would manage this product long term?** -

**How much leverage will this create to solve more problems in the future?** -

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
ref: ${{ inputs.commit_sha }}

- name: Setup the Node environment
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '18.13'

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ datadog-setup.php
# web
# @TODO: Installer paths is not working. Leaving symlink for now.

# Ignore Next (next-build)
next

# Temporary .deb packages
*.deb

Expand Down
51 changes: 51 additions & 0 deletions .next/403-error-document.j2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!-- This is a Jinja2 template without a *.j2 extension because it isn't testable in a browser with *.j2. -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Next-build Preview not built yet</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="refresh" content="2" />

<style>
body {
/* VA.gov dark blue */
background: #112e51;
text-align: center;
color: white;
}

p {
font-size: large;
}

a {
text-decoration: underline;
color: white;
}

.hero {
margin-top: 25px;
width: 70%;
height: 20%;
object-fit: cover;
object-position: 0 80%;
}

.container-info {
margin-bottom: 100px;
}
</style>
</head>

<body>
<img class="hero" src="/.next/artur-pokusin-unsplash.jpg">
<h1>Next-build not ready yet</h1>
<div class="container-info">
<p>The next-build server is not built & running yet.</p>
<p>Check the status of the <code>composer va:next:start</code> command in the logs to learn more.</p>
</div>
<footer>Photo by <a href="https://unsplash.com/@arturpokusin?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Artur Pokusin</a> on <a href="https://unsplash.com/s/photos/void?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>
</footer>
</body>

</html>
51 changes: 51 additions & 0 deletions .next/503-error-document.j2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!-- This is a Jinja2 template without a *.j2 extension because it isn't testable in a browser with *.j2. -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Next-build Preview Server 503 Error</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="refresh" content="2" />

<style>
body {
/* VA.gov dark blue */
background: #112e51;
text-align: center;
color: white;
}

p {
font-size: large;
}

a {
text-decoration: underline;
color: white;
}

.hero {
margin-top: 25px;
width: 70%;
height: 20%;
object-fit: cover;
object-position: 0 80%;
}

.container-info {
margin-bottom: 100px;
}
</style>
</head>

<body>
<img class="hero" src="/.next/artur-pokusin-unsplash.jpg">
<h1>Next-build server 503 response</h1>
<div class="container-info">
<p>There was a 503 error returned from the next-build server when it asked for this route.</p>
<p>Check the status of the <code>composer va:next:start</code> command in the logs to learn more.</p>
</div>
<footer>Photo by <a href="https://unsplash.com/@arturpokusin?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Artur Pokusin</a> on <a href="https://unsplash.com/s/photos/void?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>
</footer>
</body>

</html>
1 change: 1 addition & 0 deletions .next/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See /.tugboat/vhost-next.conf.
Binary file added .next/artur-pokusin-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
- cms
- web
- storybook
- next

# Set this as the default service. This does a few things
# 1. Clones the git repository into the service container
Expand Down Expand Up @@ -49,7 +50,7 @@ services:

# Install opcache, and Apache modules
- docker-php-ext-install opcache
- a2enmod headers rewrite vhost_alias
- a2enmod headers rewrite vhost_alias proxy proxy_http
# Install datadog agent for application tracing and profiling.
- DD_API_KEY=" " DD_INSTALL_ONLY=true DD_SITE="ddog-gov.com" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"

Expand All @@ -62,6 +63,9 @@ services:
# Setup storybook-*. vhost to serve static website.
- cp "${TUGBOAT_ROOT}"/.tugboat/vhost-storybook.conf /etc/apache2/sites-enabled/

# Setup next-*. vhost to serve static website.
- cp "${TUGBOAT_ROOT}"/.tugboat/vhost-next.conf /etc/apache2/sites-enabled/

# Configure KeepAliveTimeout in apache2.conf. This is set 5 seconds longer than the internal tools ALB.
# The internal tools ALB idle timeout is set to longer than a typical GQL query takes.
- sed -e 's/KeepAliveTimeout 5/KeepAliveTimeout 185/' -i /etc/apache2/apache2.conf
Expand Down Expand Up @@ -184,11 +188,14 @@ services:
# This command is shared by the clone and build stages, make sure to update both stages.
- j2 "${TUGBOAT_ROOT}/.web/403-error-document.j2.html" -o "${TUGBOAT_ROOT}/.web/403-error-document.html"
- j2 "${TUGBOAT_ROOT}/.storybook/403-error-document.j2.html" -o "${TUGBOAT_ROOT}/.storybook/403-error-document.html"
- j2 "${TUGBOAT_ROOT}/.next/403-error-document.j2.html" -o "${TUGBOAT_ROOT}/.next/403-error-document.html"
- j2 "${TUGBOAT_ROOT}/.next/503-error-document.j2.html" -o "${TUGBOAT_ROOT}/.next/503-error-document.html"
- composer install
- bash -lc 'nvm install'
- bash -lc 'npm install'
- bash -lc 'composer va:theme:compile'
- bash -lc 'composer va:web:install'
- bash -lc 'composer va:next:install'
# https://www.drush.org/latest/deploycommand/ (updatedb, cache:rebuild, config:import, deploy:hook)
- drush deploy

Expand All @@ -212,6 +219,8 @@ services:
# This command is shared by the clone and build stages, make sure to update both stages.
- j2 "${TUGBOAT_ROOT}/.web/403-error-document.j2.html" -o "${TUGBOAT_ROOT}/.web/403-error-document.html"
- j2 "${TUGBOAT_ROOT}/.storybook/403-error-document.j2.html" -o "${TUGBOAT_ROOT}/.storybook/403-error-document.html"
- j2 "${TUGBOAT_ROOT}/.next/403-error-document.j2.html" -o "${TUGBOAT_ROOT}/.next/403-error-document.html"
- j2 "${TUGBOAT_ROOT}/.next/503-error-document.j2.html" -o "${TUGBOAT_ROOT}/.next/503-error-document.html"

online:
# We only want tests running on PRs, not branches like the base preview build of main.
Expand All @@ -224,8 +233,10 @@ services:
- find -L "${DOCROOT}/vendor/va-gov/content-build/node_modules/.bin" -type f -exec chmod +x {} \+
- find "${DOCROOT}/vendor/va-gov/content-build/script" -type f -exec chmod +x {} \+

# Build storybook and the frontend in parallel
# Build storybook and the frontends in parallel
- bash -lc 'time task --taskfile=tugboat.yml'
# Build next build server
- bash -lc 'composer va:next:start'

memcache:
image: tugboatqa/memcached:1.6
Expand Down
48 changes: 48 additions & 0 deletions .tugboat/vhost-next.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# If testing changes to this file on the tugboatqa/php:7.1-apache image (current),
# use `apache2ctl -S` to check for syntax issues then `killall apache2` to get changes to take.
# Or "Stop" then "Start" the preview as that will restart apache2 too. Worth noting that
# `service apache2 reload|restart` doesn't work on this image as `runit` is used.
# Also `sv restart apache` acts like it works but it doesn't and doesn't bubble up any errors.

<VirtualHost *:80>

ServerName next-wildcard
# Route preview URLs with prefix of `next-` to folder where the generated site output is symlinked.
# e.g. https://next-msecydk1vl7ncmpkgh8vevjhzq25vacv.ci.cms.va.gov/
ServerAlias next-*
VirtualDocumentRoot /var/lib/tugboat/docroot/next/.next

Alias "/.next" "/var/lib/tugboat/.next"
ErrorDocument 403 /.next/403-error-document.html
ErrorDocument 503 /.next/503-error-document.html

<Directory /var/lib/tugboat/docroot/next/.next/>
Options FollowSymLinks
Require all granted
</Directory>

<Directory /var/lib/tugboat/.next/>
Require all granted
</Directory>

ProxyPreserveHost on
# Ignore redirecting error doc directory
ProxyPass /.next/ !
# Redirect requests to the running node server from next-build
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel debug

# On Tugboat these are symlinks to /dev/null by default.
# `rm /var/log/apache2/*.log` and they will be generated.
# Then `tail -f /var/log/apache2/*` will work.
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

SetEnvIf X-Forwarded-Proto "^https" HTTPS=on
</VirtualHost>
25 changes: 22 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"symfony/phpunit-bridge": "^5.1",
"symfony/process": "^4.0",
"symfony/routing": "^4.0",
"va-gov/content-build": "^0.0.3372",
"va-gov/content-build": "^0.0.3376",
"vlucas/phpdotenv": "^5.3",
"webflo/drupal-finder": "^1.0.0",
"webmozart/path-util": "^2.3",
Expand Down Expand Up @@ -383,7 +383,8 @@
"3047110 - Add workflow to taxonomy" : "https://www.drupal.org/files/issues/2023-04-14/3047110-45.patch",
"3106205 - Length of menu_tree.url and menu_tree.route_param_key are too short (255 characters)": "https://www.drupal.org/files/issues/2023-05-24/3106205-length-menu-tree-too-short.patch",
"3274419 - Make BaseFieldOverride inherit internal property from the base field": "https://www.drupal.org/files/issues/2023-03-13/3274419-45.patch",
"3333401 - Pager h4 cause accessibility flag on many pages": "https://www.drupal.org/files/issues/2023-07-27/3333401-56-configurable-heading-pager.patch"
"3333401 - Pager h4 cause accessibility flag on many pages": "https://www.drupal.org/files/issues/2023-07-27/3333401-56-configurable-heading-pager.patch",
"3382759 - Add multiple workflow content moderation filter to Views.": "https://www.drupal.org/files/issues/2023-08-24/3382759-8.patch"
},
"drupal/danse": {
"3364925 - added explicit access check": "https://www.drupal.org/files/issues/2023-06-05/3364925-added-explicit-access-check.patch"
Expand Down Expand Up @@ -571,7 +572,10 @@
"va:theme:watch": "Watch VA.gov Claro theme source and compile as needed.",
"va:web:build": "Perform a content build.",
"va:web:install": "Prepare the content-build project.",
"va:web:prepare-dotenv": "Prepare the ./web/.env file."
"va:web:prepare-dotenv": "Prepare the ./web/.env file.",
"va:next:install": "Prepare the next-build project",
"va:next:build": "Build the next-build server for preview",
"va:next:start": "Start the next-build server for preview"
},
"scripts": {
"pre-install-cmd": [
Expand Down Expand Up @@ -817,6 +821,21 @@
"# Prepare the ./web/.env file.",
"! ./scripts/should-run-directly.sh || ./scripts/web-prepare-dotenv.sh",
"./scripts/should-run-directly.sh || ddev composer va:web:prepare-dotenv --"
],
"va:next:install": [
"# Prepare the next build project",
"! ./scripts/should-run-directly.sh || ./scripts/next-install.sh",
"./scripts/should-run-directly.sh || ddev composer va:next:install --"
],
"va:next:build": [
"# Prepare the next build server",
"! ./scripts/should-run-directly.sh || ./scripts/next-build.sh",
"./scripts/should-run-directly.sh || ddev composer va:next:build --"
],
"va:next:start": [
"# Start the next build server",
"! ./scripts/should-run-directly.sh || ./scripts/next-start.sh",
"./scripts/should-run-directly.sh || ddev composer va:next:start --"
]
}
}
Loading

0 comments on commit c478d34

Please sign in to comment.