Skip to content

Conversation

@mjumbewu
Copy link
Member

@mjumbewu mjumbewu commented Jan 14, 2026

  • Add state configuration for OpenTofu (or Terraform); current configuration is for Google Cloud Platform, but other configurations could be added for AWS, Azure, etc.
  • Update tests to be able to run on GH Actions (adapt from Travis tests)
  • Add Makefile for running tests and building image

This commit adds Google Cloud Platform as a deployment target for the Shareabouts API.

Infrastructure:
- Added OpenTofu configuration for GCP in `infra/gcp/`. Can add other platform tofu configs in infra/ later.
- Configured Cloud Run for the API service.
- Set up Cloud SQL (PostgreSQL) and Cloud Memorystore (Redis).
- Created GCS bucket for media attachments.

Application:
- Updated `settings.py` for GCP-compatible storage, database, and cache.
- Reverted static file serving to use local container serving (via `dj_static`) to preserve custom middleware functionality.
- Updated `Containerfile` with collection of static files.
- Integrated `google-cloud-logging` for GCP Error Reporting.

Documentation:
- Added comprehensive GCP deployment instructions in `doc/DEPLOY.md`.
…ose services, and add a test error endpoint.
…oyments and simplify Docker Compose configuration.
…ting, update deployment documentation, and refine Celery broker URL parsing.
….x and match the local development environment.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR sets up Infrastructure as Code (IAC) for deploying the Shareabouts API to Google Cloud Platform using OpenTofu/Terraform. It also migrates CI/CD from Travis CI to GitHub Actions and adds a Makefile for common deployment tasks.

Changes:

  • Added comprehensive Terraform/OpenTofu infrastructure configuration for GCP (Cloud Run, Cloud SQL, Redis, GCS, networking, IAM, secrets)
  • Migrated from Travis CI to GitHub Actions for testing
  • Added Makefile with targets for building, testing, and deploying to GCP
  • Updated Containerfile to use virtual environment and support Cloud Run deployment
  • Enhanced settings.py with GCP-specific configuration (GCS storage, database from components)
  • Updated compose.yml to support test service and better environment configuration

Reviewed changes

Copilot reviewed 21 out of 24 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
infra/gcp/*.tf Terraform/OpenTofu infrastructure definitions for GCP resources including Cloud Run, Cloud SQL, Redis, networking, storage, IAM, and secrets management
.github/workflows/test.yml New GitHub Actions workflow replacing Travis CI for automated testing
Makefile Build and deployment automation for local development and GCP deployment
Containerfile Enhanced container definition with virtual environment and Cloud Run compatibility
src/project/settings.py Added GCS storage backend and database configuration from environment components
src/project/urls.py Added test error endpoint for debugging
compose.yml Updated with test service and improved environment variable configuration
doc/DEPLOY.md Added comprehensive GCP deployment documentation
requirements.txt Added google-cloud-storage dependency
gunicorn.conf.py Added logging and timeout configuration
Files not reviewed (1)
  • infra/gcp/.terraform.lock.hcl: Language not supported
Comments suppressed due to low confidence (1)

src/project/settings.py:100

  • This assignment to 'ATTACHMENT_STORAGE' is unnecessary as it is redefined before this value is used.
ATTACHMENT_STORAGE = 'django.core.files.storage.FileSystemStorage'

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mjumbewu and others added 2 commits January 17, 2026 16:05
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…REFIX` configuration via environment variables for Cloud Run deployment.
…OSTS` environment variable to automatically include Cloud Run and custom domain URLs.
…v2 domain management, load balancing, and SSL certificates.
…n and service configurations

These secrets archive the tfvars setup needed to work with the infrastructure.
@mjumbewu mjumbewu merged commit 9366050 into master Jan 19, 2026
1 check passed
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