Skip to content

Drop-in, zero-fuss, lightning-fast development environment for Roots/Bedrock.

License

Notifications You must be signed in to change notification settings

pixelcollective/traefik-ify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traefik-ify

Roots Docker Codacy Badge Reviewed by Hound Gitter

Easily add Traefik and Docker support to your roots/bedrock project. It's great! It's super easy to do! Nothing to lose (except some port conflicts!)

And it's basically non-destructive for an existing Trellis setup. Dank.

My Docker VMs now start up in less than ten seconds. They take up a fraction of the harddrive space. They use a completely negligible amount of RAM.

Requirements

  1. Docker
  2. Docker-compose

Try it out

The following assumes you are running Bedrock in a local environment.

Run the following commands from the traefik directory:

  1. docker network create traefikify
  2. docker-compose up -d

Run the following commands from the example.com directory:

  1. composer install
  2. mv env.example .env
  3. docker-compose up -d

You will then need to add example.test to /etc/hosts, or however you manage your virtual hosts.

The WordPress installation screen should be available at example.test. Additionally, you can monitor traefik at localhost.

Add to existing install

The mixins directory contains everything you need. You should be able to more-or-less just drop those files in and get to work, but read on:

  1. Copy ./config/docker/ to your config directory.
  2. Copy ./Dockerfile to bedrock root.
  3. Copy ./docker-compose.yml to bedrock root.
  4. Add database to your .gitignore 🙀
  5. Make sure the variables in the traefik-ify env.example are included in your existing .env. It should look something like this:
WP_ENV=development
DOMAIN_CURRENT_SITE=example.test
WP_HOME=http://example.test
WP_SITEURL=http://example.test/wp
DB_NAME=example_test_development
DB_USER=example_test
DB_PASSWORD=example_test

Party

You should be good to execute docker-compose up from traefik, then your Bedrock root. You'll notice the database mounts to a directory in Bedrock. You can change this behavior (and lots of other things) in docker-compose.yml.

Credits

About

Drop-in, zero-fuss, lightning-fast development environment for Roots/Bedrock.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published