-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Add support for Laravel projects #951
Conversation
I would also love to help with this project as I've just converted another PHP (X-Cart 4) project to work with Trellis. A few things I'd like to know if we can implement are:
|
Is support for non-WP CMSes/custom projects something you are interested in @swalkinshaw? |
Probably, but it needs to be done properly which is hard. We talked about this internally a bit, and Ansible 2.5 should help us do this in a cleaner way. Off the top of my head, the optimal solution would probably look like:
|
What needs to wait until 2.5? Thank you for considering this. |
@partounian When I get time, I'll create a demo of one potential implementation. It relies on Ansible's |
Ansible 2.5 is now available 🎉 |
Would really love to see this happening. Been working on a basic Ansible Playbooks package myself, but always considered using Trellis for Laravel as well. Seems like it is going to be possible now for Laravel as well as other CMS especially since Ansible 2.5 is out. |
I too would love to see this merged in. I have just gone through 5 different Ansible Playbooks meant for Laravel in the past few days and have now found my way here. While it's tempting to use the package created by the author of this PR, and I thank him for the hard work he's put into both his package as well as this PR, I would much rather be tied to to Trellis simply because it's much more likely to be actively developed and contain the latest bug fixes / security fixes. It seems pretty straightforward to just use Trellis and make a few modifications to make it work with Laravel.. but having full support would definitely make this the # 1 playbook for Laravel/Ansible Now that 2.5 is out, and with the final 1.0 likely around the corner, I really hope this becomes a reality! |
@fullyint Hope you will be able to give this implementation a spin soon. Would really be awesome to have Laravel implemented with Trellis. Sage and Laravel have more and more in common. Would be great to move Laravel further into the Trellis fold as well. |
Just a heads up but the main feature needed is only available in Ansible 2.7. We can likely become 2.7 compatibility without too much difficulty, but it needs testing most of all. |
@swalkinshaw link to main feature? I'm definitely interested in having with this. P.S. I've added redis support for a project, would you accept a PR for that? |
Probably, but it would have to be optional. |
Let me know what testing can be done by Trellis fans like myself. I am up for it. |
Do you have a high level idea of how to implement such features? I'm down
to take a stab at it all.
On Tue, Dec 11, 2018, 5:18 AM Scott Walkinshaw ***@***.***> wrote:
ansible/ansible#41330 <ansible/ansible#41330>
P.S. I've added redis support for a project, would you accept a PR for
that?
Probably, but it would have to be optional.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#951 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACbIG1JGqHcJgLEDEUc7jqVIGBADdbqeks5u37CTgaJpZM4SW44g>
.
--
Thank you,
Patrick Artounian
|
At a minimum people can install Ansible 2.7.x and test Trellis in development and ideally on a (test) production server and see if you run into any errors. And try to fix them if so 😄 |
I've been running 2.7 without issues.
|
We ran into one issue with 2.7 but it's been fixed and we bumped the version test max in #1045 |
now that 1.0 has been officially released, it would be so lovely to finish this and add support for Laravel! I've been maintaining a fork for a while but it's incomplete and I would much prefer to use all the latest patches from 1.0 @ptibbetts any chance you could verify if your PR still works against the latest 1.0? Also, out of curiosity, did you go so far as to add other Laravel-specific things such as flags to set up Laravel Horizon with supervisor? |
is there a fork somewhere that uses a recent build of Trellis with added support for Laravel? Would love to test it out! |
Hey,
This pull request adds support for Laravel projects.
It's based on a fork of Trellis I made a while ago that replaced WordPress with Laravel which I've recently uploaded to GitHub https://github.com/ptibbetts/anstead.
It works by adding a "project type" to
wordpress_sites.yml
(now calledapps.yml
) - this is so that tasks can still loop through all the apps defined in apps.yml but certain tasks will only run for WordPress/Laravel projects.It's fairly agnostic. New project types can be supported by adding project-specific install/setup roles and then conditionally including them from the
app_install
/app_setup
roles, however I haven't gone as far as to do the same with the deploy role, that just contains a mix of tasks, some of which are specific to WordPress and some to Laravel. You would also need to add default environment settings for the project to thegroup_vars/helpers.yml
file and add the project type to the conditional overwrite so thatapp_env
uses those defaults instead of the WordPress/Laravel ones.It works somewhat towards solving #914 (support any PHP + Composer based application) however there are a few seemingly-common tasks that vary depending on the project, such as the names of environment settings (
db_name
for WP anddb_database
for Laravel - used by the mariadb role) as well as the Nginx config (/current/web
for WP and/current/public
for Laravel).💚