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

[WIP] App-agnostic / Laravel support Updates #1123

Open
wants to merge 92 commits into
base: app-agnostic
from

Conversation

@lukasbesch
Copy link

lukasbesch commented Nov 20, 2019

I used #1063 as a starting point to support both WordPress and Laravel.

Inspired by: pepijn-vanvlaanderen/trellis-laravel, ptibbetts/anstead / #951, #914

I tested the provisioning and deployment on a fresh remote machine running both a bare-bone Bedrock installation and a Laravel app.

Don't use this in production!

Summary of changes:

  • Merged current trellis version
  • Updated the apps type property behaviour.
    Defaults to wordpress. Can be laravel.
  • Add a web_root property to apps.
    Defaults to web or to public if type is laravel.
  • App-agnostic configuration
    • app_env_defaults
    • nginx_skip_cache_uri
    • nginx_skip_cache_cookie
    • nginx site.conf (uploads, X-Frame-Options, multisite)
  • App-agnostic install and setup tasks.
  • Database creation looks for multiple environment variables. I think it can be done better.
  • Deploy sub tasks for Laravel:
    • run migrations
    • flush caches
    • link storage
    • reload php
    • restart queue workers
  • Add Redis role
  • Add Node support using NVM
  • Added Example for building assets on the remote machine
  • Conditional roles Memcached, Redis, Node (#951 solves this)
    only if sites with the corresponding app type are available (like sites_use_ssl)
    or if explicitly specified.
  • docs update

Adding Node should be discussed. I use Laravel Mix and it loads env variables like MIX_ASSET_URL during build, so the config has to be the same as on production ideally. An alternative approach would be to apply the production configuration locally (making a backup of the original .env file or something).

mockey and others added 30 commits Jan 13, 2019
Don't add HSTS header for self-signed
Mark vars that shouldn't be templated with AnsibleUnsafe instead of {% raw %}
…sible-galaxy-in-dev

Revert "Don't force install Ansible Galaxy in dev"
Update Nginx Mainline ppa
Remove community health files so that defaults from roots/.github are used
Return a 401 in all cases to prevent snooping
Revert to a 403 (`deny all`)
* Use all canonical site hosts for Landrush TLD

This is useful if you want to use WordPress’ multisite domain mapping
locally and if you’ve specified canonical hosts which are not
sub-domains of the main canonical host.

* Filter subdomains for Landrush TLD resolver

This filters out subdomains of the main hostname for the Landrush
TLD(s). This way it only adds necessary resolvers.

For example, of the following:

- `example.test` (main hostname)
- `subdomain.example.test`
- `client.test`

We tell Landrush (dnsmaq) to only create:

- `/etc/resolver/example.test`
- `/etc/resolver/client.test`

Because `example.test` handles `subdomain.example.test`.
Show custom error message if external IP resolution fails
Prevent direct access for .blade.php files
This step will prevent errors such as: No package matching 'build-essential' is available
Fixed Vagrant VMware provider display name
[ci skip]
swalkinshaw and others added 30 commits Sep 4, 2019
Update galaxy packages
CLI options changed a lot in 2.8. This updates our callback plugin to
support both 2.7 and 2.8 by normalizing each case into a dict.

Ref: ansible/ansible#50069
Ansible 2.8 support
Update WP CLI to v 2.3.0
Ansible 2.8 support: Generate self-signed certificates
Lets Encrypt ACME v2 support
`pip_install_cmd` only exists in 2.2.5+
Block these dependency managers:
- composer
- npm
- yarn
- bundler
…r-files

wordpress-setup: Block dependency manager files by Nginx
Remove unused optional block arguments
from 3650 days to 825, the new maximum time allowed under macOS Catalina
Change self-signed certificate expiry time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.