Skip to content

admin_pages_dev: Modified docker-compose configurattion#178

Merged
Riyad-Murad merged 1 commit intostagingfrom
admin_pages_dev
May 21, 2025
Merged

admin_pages_dev: Modified docker-compose configurattion#178
Riyad-Murad merged 1 commit intostagingfrom
admin_pages_dev

Conversation

@Riyad-Murad
Copy link
Owner

@Riyad-Murad Riyad-Murad commented May 21, 2025

Summary by Sourcery

Apply resource constraints and low-memory optimizations to Docker services, deploy a custom MySQL configuration file via CI workflows, and streamline Laravel startup with cache management.

Enhancements:

  • Add memory and CPU limits to application, database, and Node.js services in docker-compose.yaml
  • Mount a custom mysql-lowmem.cnf for low-memory MySQL tuning
  • Set NODE_OPTIONS to cap Node.js memory usage
  • Enhance dockerShell.sh to clear and cache Laravel config, routes, and views before migrations

CI:

  • Add SCP steps in staging and production workflows to transfer mysql-lowmem.cnf to EC2 servers

Chores:

  • Add new mysql-lowmem.cnf configuration file

@sourcery-ai
Copy link

sourcery-ai bot commented May 21, 2025

Reviewer's Guide

This PR refactors Docker Compose to enforce resource limits and a low-memory MySQL configuration, augments CI/CD workflows to deploy the new config file, and hardens the application startup script by clearing and precaching Laravel caches before migrations.

File-Level Changes

Change Details Files
Enforce resource constraints on services in docker-compose
  • Added mem_limit and cpus to web, database, and node-server services
  • Reordered and consolidated port mappings for mysql-database
docker-compose.yaml
Integrate low-memory MySQL configuration
  • Introduced mysql-lowmem.cnf with custom MySQL settings
  • Mounted the custom config file into the mysql-database container
mysql-lowmem.cnf
docker-compose.yaml
Update GitHub workflows to deploy custom MySQL config
  • Added SCP step to staging workflow to copy mysql-lowmem.cnf to EC2
  • Added SCP step to production workflow to copy mysql-lowmem.cnf to EC2
.github/workflows/stacksDockerDeployStaging.yaml
.github/workflows/stacksDockerDeployProduction.yaml
Enhance dockerShell.sh for Laravel caching and clearing
  • Added commands to clear config, cache, route, and view before caching
  • Ensured cache commands run before migrations
amp-laravel/dockerShell.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Riyad-Murad Riyad-Murad merged commit c59901c into staging May 21, 2025
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.

1 participant