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

PGOV-314: Setup for deployment #26

Open
wants to merge 52 commits into
base: main
Choose a base branch
from

Conversation

acabouet
Copy link
Collaborator

@acabouet acabouet commented Nov 24, 2024

This PR adds configuration and scripts for deploying the Drupal backend and the NextJS frontend of the PGOV MVP to the Cloud.gov environment using cloudfoundry cli.

In summary:

  • manifest.yml is cloud.gov environment settings including the buildpacks we will use to build the frontend and backend.
  • .bp-config is config for the PHP, NGINX, and apt (for dependency install) build packs
  • bootstrap.sh is the script to install the drupal site, import existing config, optionally import a database, and complete migrations for files and media.
  • bin/deploy-cloudgov.sh is a script that automates the creation of the services need for the backend to run (database, storage, secrets), setting necessary environment variables to pass to drupal install on the server, and then running the bootstrap script.
  • cronish.sh sets up automated cron

Additionally in this PR is config to enable api connections between the dev environment frontend and backend, and a content security policy for the frontend that allow images from drupal and frontend app preview in drupal to work.

Misc other stuff happening in here: labels added to admin menu for gin theme, removing a field that no longer exists on agencies from requests and templates on the frontend. Also .github/workflows/cloudfoundry-deploy.yml is the start of the config that will allow for automated building, testing, and deployment of new PRs.

@acabouet acabouet force-pushed the PGOV-314-Deployment-Config-AC branch from 1ead407 to 3d3bd92 Compare November 26, 2024 19:48
@acabouet acabouet force-pushed the PGOV-314-Deployment-Config-AC branch 2 times, most recently from 4a44954 to 0972e9f Compare December 9, 2024 02:30
Copy link
Contributor

@dgading dgading left a comment

Choose a reason for hiding this comment

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

The frontend code and what I know of the config looks good. I think I have some fixes for the facets on the goal search in my PR. I am not very familiar with the devops part so I am not sure what I am looking at to approve.

@@ -0,0 +1,3 @@
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 512M
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oof, this is pretty low. It might be OK, but if we're seeing issues with migrations etc, I'd look here first.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The migrations with issues are failing because of a timeout of 180 seconds for build operations run via the cloudfoundry CLI. The migrations that complete within three minutes like agencies and goals finish without issues. The ones that take longer like plan_files and report_files fail due to timeout. The timeout maximum is unfortunately not impacted by this setting and I think we need to get with cloud.gov support to change. Will reach out to them.

64M is the minimum php memory requirement for Drupal 10 so 512M seemed generous but definitely down to bump this up if we're seeing other issues.

@acabouet acabouet force-pushed the PGOV-314-Deployment-Config-AC branch 2 times, most recently from 1293dcc to f591b41 Compare December 10, 2024 18:19
@acabouet acabouet requested a review from vauxia December 10, 2024 20:01
@acabouet acabouet force-pushed the PGOV-314-Deployment-Config-AC branch 6 times, most recently from bf6543c to 2506df5 Compare December 18, 2024 01:38
@acabouet acabouet force-pushed the PGOV-314-Deployment-Config-AC branch from 2506df5 to 1558464 Compare December 18, 2024 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants