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-400: Config for deployment to cloud.gov #54

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

Conversation

acabouet
Copy link
Collaborator

@acabouet acabouet commented Jan 27, 2025

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 folder contents (and apt.yml) are 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. You only need to run this if you've completed deleted the database, storage, and secrets containers on cloud.gov for some reason.

@vauxia
Copy link
Collaborator

vauxia commented Jan 27, 2025

Thank you for separating this out from site config stuff! It's much clearer.

This looks like this could use some streamlining. I'm going to try to make a branch from this branch to see if I can get it into alignment.

Here's the scoop: The PHP Buildpack ships with nginx as a web server. The expectation here is that we'd respect that choice, and set the site up using Nginx config files. In this scenario:

  • .htaccess files get ignored and our overrides should go directly into the server configuration on nginx.
  • Nginx configurations (easily identified by snake_case) persist, but Apache configurations (which use CamelCase) would go away.
  • Basic auth needs to live in the nginx configuration and follow that format

I was confused about how any of this is working, but it appears that the apache2-utils package is brokering Apache-specific configurations into Nginx. Unless there's a use case that demands this, I would advocate for the removal of this dependency, and following nginx all the way.

I will try to take a swing at this.

@acabouet acabouet force-pushed the pgov-400-cloudgov-config branch 2 times, most recently from 5243bae to 9fa8884 Compare February 4, 2025 05:30
@acabouet acabouet force-pushed the pgov-400-cloudgov-config branch from de5e890 to 4efefce Compare February 5, 2025 22:31
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.

2 participants