jecko
October 10, 2018, 3:10pm
1
Hi,
I would like to provision a server (GCP compute engine) with Trellis but without WordPress requirements because it will be for a simple landing page with Symphony. I would like to keep other configuration roles that are goods for performance and security.
I think to skip roles (commented) like mariadb
(no need of DB), wp-cli
and wordpress-setup
in server.yml
, but wordpress-setup
seems to be related to configuration with TLS/SSL Let’s Encrypt.
Is it possible to provision with Trellis and get a functional web server for an other framework than WordPress just by removing these roles?
Also the wordpress_sites
definition in group vars production add a doubt about this possibility of provisioning for something else.
Thank you
ben
October 10, 2018, 3:38pm
2
What have you tried so far?
Please go down the path of trying things out first before asking whether or not you can.
You can also read up on previous discussions about Trellis & Laravel, including the open issue/PR on GitHub.
jecko
October 10, 2018, 5:50pm
3
I have a short delay for this project, so short that I already give the project to an agency because of the uncertainty for the run.
In my experiences with server config, many times everything seemed to work great until I integrated the code that needs something that was missing.
I wanted to check if someone else has already experience with this.
I will give a try and read about Trellis Laravel, I had found nothing in my search in issues on Github or elsewhere.
I will come back to add my experience if it concludes right.
Thank you
ben
October 10, 2018, 7:04pm
4
via GH search
roots:master
← ptibbetts:laravel
opened 03:54PM - 28 Feb 18 UTC
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 called `apps.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 the `group_vars/helpers.yml` file and add the project type to the conditional overwrite so that `app_env` uses those defaults instead of the WordPress/Laravel ones.
It works somewhat towards solving https://github.com/roots/trellis/issues/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 and `db_database` for Laravel - used by the mariadb role) as well as the Nginx config (`/current/web` for WP and `/current/public` for Laravel).
- [x] I'm happy to make any necessary changes to this PR
- [x] I understand the consequences of not checking with the team before doing this
💚
https://github.com/roots/trellis/issues/914