{"id":13564559,"url":"https://github.com/richdynamix/arc","last_synced_at":"2026-01-11T11:57:12.126Z","repository":{"id":47581926,"uuid":"106472027","full_name":"richdynamix/arc","owner":"richdynamix","description":"Production ready docker based development environment for your Laravel project.","archived":false,"fork":false,"pushed_at":"2021-08-23T11:35:27.000Z","size":53,"stargazers_count":117,"open_issues_count":1,"forks_count":18,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-24T15:10:04.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/richdynamix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-10T21:13:13.000Z","updated_at":"2023-05-10T07:07:28.000Z","dependencies_parsed_at":"2022-09-05T22:50:50.722Z","dependency_job_id":null,"html_url":"https://github.com/richdynamix/arc","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richdynamix%2Farc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richdynamix%2Farc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richdynamix%2Farc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richdynamix%2Farc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richdynamix","download_url":"https://codeload.github.com/richdynamix/arc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247083115,"owners_count":20880775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:32.940Z","updated_at":"2026-01-11T11:57:12.120Z","avatar_url":"https://github.com/richdynamix.png","language":"Shell","readme":"# Arc\n\nBootstrap your new Laravel projects with a highly configurable, production ready Docker environment. Automated build, test and deploy to [Kubernetes](https://kubernetes.io/) using [Travis CI](https://travis-ci.com/)\n\n## Overview\n\nArc is a simple Laravel package to add the ultimate Docker environment for the majority of your applications. Built upon the amazing [ContinuousPipe Dockerfiles](https://github.com/continuouspipe/dockerfiles), this package will add the correct Dockerfile, Docker Compose and configurations into your Laravel project.\n\nAdditionally - if selected, it can also add a Continuous Integration \u0026 Continuous Deployment configuration to work with Travis CI and Kubernetes.\n\nThe Docker configuration provides the following:\n\n- PHP 7.4 (Configurable for 5.6, 7.0, 7.1, 7.2, 7.3, 7.4)\n- NodeJS 11 inc NPM\n- NGINX\n- MySQL 8\n- REDIS 6\n- ConfD templating\n- SupervisorD for process management\n- Configurable queue workers\n- Auto start Laravel Horizon processes\n- Auto start CRON\n- Easily create a CRON only container. Useful for zero downtime deployments to a Kubernetes cluster\n- Configure the entire infrastructure with environment variables.\n\nCI/CD Configuration contains the following:\n\n- Travis CI YAML configuration\n- **Build** and **Push** your Docker image to [Docker Hub](https://hub.docker.com/)\n- Automated BASH file \u0026 Dockerfile linting\n- Automated [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer), [PHPMD](https://github.com/phpmd/phpmd) \u0026 [PHPStan](https://github.com/phpstan/phpstan) static code analysis\n- Automated [PHP Unit](https://phpunit.de/) tests\n- Configure **Kubernetes** cluster context via the [Kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) tool\n- Configure and deploy your application to Kubernetes with the use of [Helm](https://www.helm.sh/) \u0026 [Helm Charts](https://helm.sh/docs/developing_charts/)\n\n## Requirements\n\nThis package is intended for new Laravel 6 projects.\n\n## Installation\n\n#### Require the package in your project\n\n```bash\n    composer require richdynamix/arc\n```\n#### Run the installer\n```bash\n    php artisan arc:install\n```\n\nYou will be prompted to choose if you want CI/CD configurations.\n\n```bash\n    Would you like a Travis CI and K8s CD configuration? (yes/no) [no]:\n```\n\nOnce complete the installer will remove Arc as a composer dependency.\n\n**Please Note: If you choose to use the CI/CD configurations then there are some local environment variables that are required before you can run the containers**\n\n```bash\n    export DOCKER_USERNAME=myUsername\n    export DOCKER_REPO=my-repo\n    export TAG=latest\n\n    export GITHUB_TOKEN=1234567890 # optional\n```\n\n#### Run the Container\n\n```bash\n    docker-compose up\n```\n\n### Continuous Integration and Deployment\n\nRequired environment variables to be added to your Travis CI repository settings -\n\nVariable | Description | Expected values | Default\n--- | --- | --- | ----\n$GITHUB_TOKEN | Personal Access Token used to access a private repository | string/null | null\n$DOCKER_EMAIL | The email address of your Docker account | string | null\n$DOCKER_PASSWORD | Docker account password to push and pull your image | string | null\n$DOCKER_REPO | The name of your Docker repository to be pushed to | string | null\n$DOCKER_USERNAME | The username of your Docker account to push and pull images | string  | null\n$K8S_CLUSTER | The name of the cluster in your Kubectl configuration | string | null\n$K8S_CLUSTER_API | Kubernetes API endpoint URL | FQDN string | null\n$K8S_PASSWORD | The password of the Kubernetes user to access the cluster | string | null\n$K8S_USERNAME | The username of the Kubernetes user to access the cluster | string | null\n\n### Static Code Analysis\n\n- PHP CodeSniffer has been configured with a `phpcs.xml` file that will be in the root of your project. This will follow PSR2 coding styles within your `app` folder only.\n- PHPMD has been configured to use a `ruleset.xml` file within the root of your project that follows best practices.\n- PHPStan has been configured on the lowest possible level `0`. If you wish to increase this level you may modify the `tools/docker/usr/local/share/container/plan.sh` file at the function `do_phpstan`\n\n*You may use your phpcs.xml and ruleset.xml file to configure your IDE such as PHPStorm to automatically check your code during development*\n\nFrom within the container, you may run any of your static code analysis tools at any time using the following commands:\n\n- `container phpcs`\n- `container phpmd`\n- `container phpstan`\n\nAdditionally, you can run `container phpunit` to run your test suite within the container.\n\n#### Connecting to the Web Container\n\nAs part of the Arc configurations there is a simple bash script added to the root of your project which allows you to call -\n```bash\n    ./ssh web\n```\nThis is simply a wrapper script for convenience. Under the hood it's simply calling `docker exec -it web bash`\n\nAddtionally, you may swap the `web` argument for any of the container names i.e. `./ssh database`, `./ssh redis`\n\n\n## Configuration\n\nArc is nothing more than a way to automatically copy the correct Docker configuration into your Laravel project. While you may have come across several Laravel based Docker environments, none of them cover the production ready setup that the ContinuousPipe Dockerfile provides.\n\nContinuousPipe Dockerfile offers an extremely flexible and solid infrastructure setup using a simple system of ConfD for templates and SupervisorD for controlling the start of services. The contents of `tools/docker/etc` and `tools/docker/usr` are copied into the container at build time which means that we can influence any environment variable and configuration.\n\nRather that explain all the functions and environment variables available to Arc, it is easier to point you to the documentation for the parent images:\n\n- [PHP NGINX](https://github.com/continuouspipe/dockerfiles/tree/master/php/nginx) - The direct parent of the Arc Docker file. By default, it uses PHP 7.4, but you can change this within the Arc Dockerfile to match your needs. (Available versions are 5.6, 7.0, 7.1, 7.2, 7.3, 7.4)\n- [Ubuntu 16.04](https://github.com/continuouspipe/dockerfiles/tree/master/ubuntu/16.04) - This is the base image which the PHP image extends. This sets up all the ConfD and SupervisorD configuration.\n\nTo manipulate your environment you can add values for any of the environment variables for any of the above. Additionally, there are a few specific to Arc which are all defined in `tools/docker/usr/local/share/env/20-arc-env`.\n\nVariable | Description | Expected values | Default\n--- | --- | --- | ----\nSTART_QUEUE | Should the Laravel Queue worker be started. | true/false | true\nRUN_LARAVEL_CRON | Should the Laravel Queue worker be started. | true/false | false\nSTART_HORIZON | Should Laravel Horizon worker be started. Do not start START_QUEUE \u0026 START_HORIZON at the same time. | true/false | false\nCOMPOSER_INSTALL_FLAGS | Allow the override of composer flags during installation | string | '--no-interaction --optimize-autoloader --ignore-platform-reqs'\n\n## Credits\n\nThis package would not have been possible would it not have been for the amazing work of the ContinuousPipe team. Also, a special thanks to Samuel for the introduction of ContinuousPipe and Kubernetes. His ability to teach Docker concepts has been of great value. A huge thanks to Kieren for his attention to detail and everlasting patience when helping me to understand the ContinuousPipe Dockerfiles and setup.\n\n- [Samuel ROZE](https://github.com/sroze)\n- [Kieren Evans](https://github.com/kierenevans)\n\n## License\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichdynamix%2Farc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichdynamix%2Farc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichdynamix%2Farc/lists"}