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

2497 update the nix shell environment with more helpful commands for cache flushing #2498

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

marvinroman
Copy link
Contributor

This pull request introduces improvements and updates related to local development using Docker and Nix, as well as the addition of some useful helper functions and aliases to facilitate Kubernetes management and deployment tasks.

Changes Summary:

  1. Refactor of README.md:

    • The section regarding local development using Docker and Nix has been reorganized and enhanced for clarity.
    • The instructions now clearly outline setup steps for different platforms (Linux vs. Other systems), and introduce Docker Compose aliases for easier workflow management.
    • Kubernetes-related aliases are now included to simplify namespace management for development, staging, and production environments.
    • A new section for pod flushing functions (kflush and kflushall) has been added, which helps run specific deployment commands (php artisan deploy:local and php artisan deploy:global) within the respective Kubernetes pods.
    • Additional clarifications for .env file generation and Docker rootless support were added.
    • Updated README.md: Changed the references from docker-compose.local.yml to docker-compose.yml in the Docker Compose aliases section.
  2. Improvements to shell.nix:

    • Removed the dependency on the unstable Nix channel by switching from unstable.php84 and unstable.php84Packages.composer to the stable php84 and php84Packages.composer versions (as of latest stable channel 24.11 these packages are included).
    • New functions and aliases (kflush, kflushall, kdflush, ksflush, kpflush) have been introduced to make working with Kubernetes namespaces and deployment processes more efficient. These functions automate the process of running Laravel deployment commands inside pods across different namespaces.
      • kflush: Executes Laravel deployment commands in all matching pods of a given namespace.
      • kflushall: Iterates through all environments and runs kflush for each.
      • kdflush, ksflush, and kpflush: Alias commands for flushing specific namespaces (development, staging, production).
    • Modified shell.nix: Adjusted the aliases in the shell.nix file to use docker-compose.yml for consistency across environments.

- Enhanced formatting and clarity of Docker and Nix setup instructions.
- Added sections for Kubernetes aliases and pod flushing functions.
- Introduced `kflush` and `kflushall` functions for Laravel deployments.
- Provided guidance on environment setup, including `.env` generation.
- Included detailed instructions for rootless Docker support.
- Removed reliance on the unstable Nix channel.
- Replaced `unstable.php84` with `php84` from stable Nixpkgs.
- Added `kflush` function to run Laravel deployment commands in app pods.
- Introduced `kflushall` to flush all environments (`development`, `staging`, `production`).
- Defined aliases for namespace-specific flushing: `kdflush`, `ksflush`, `kpflush`.
- Updated README.md to reference docker-compose.yml instead of docker-compose.local.yml.
- Modified shell.nix aliases to use docker-compose.yml for consistency across environments.
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.

Update the Nix shell environment with more helpful commands for cache flushing.
1 participant