Giter Site home page Giter Site logo

kgozman / wordpress-heroku-docker-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anttiviljami/wordpress-heroku-docker-project

0.0 1.0 0.0 80 KB

Wordpress Heroku Docker Project

Home Page: https://wp-project-dev.herokuapp.com/

License: GNU General Public License v3.0

Shell 2.61% Nginx 5.69% PHP 91.70%

wordpress-heroku-docker-project's Introduction

WP Heroku Docker Project

Build Status License

The Holy Grail WordPress project template for Heroku deployment and local Docker development.

Play Video

Video Tutorial available on YouTube

Features

  • Bedrock-like modern development environment
  • Deployment to Heroku pipelines
  • Local Heroku-like environment with Docker-compose
  • PHP 7
  • WP-CLI
  • Configurable Nginx
  • Redis Object Cache
  • Travis CI pipeline you can run with Docker
  • PHP Codesniffer with nicer coding standards for WordPress
  • Media Uploads to S3
  • Newrelic APM monitoring
  • Papertrail log management
  • Environment management for complete local, development, qa and production pipeline
  • CloudFormation script for provisioning a MariaDB RDS instance and an S3 bucket on AWS
  • Basic integration tests

Local Development

Install Docker

Clone this repo and source set up your environment inside the project root.

cp .env.sample .env
source .env

I also recommend installing autoenv, so you don't have to run the source command all the time.

Start a shell inside Docker. It might take a moment for the images to download and build. This is normal.

docker-compose run shell

Now you can run composer install inside Docker

composer install

Outside the docker shell, you can now start the main process

docker-compose up web

You can now navigate to http://localhost:8080 to start working with your local WordPress installation.

Deploying to Heroku

Database and S3 Bucket

Use the included CloudFormation script to provision a MariaDB instance and an S3 bucket for uploads on AWS.

Launch Stack

The script will output the values needed for Heroku config variables:

AWS Cloudformation script output

Heroku App

Set up a new app on Heroku for your WordPress project. Use the values generated by the Cloudformation script previously

Deploy

This is how your project should look like on Heroku:

Heroku App Dashboard

Here's an example of a WordPress instance running on Heroku:

wp-project-dev.herokuapp.com

WP-CLI

You can run WP-CLI locally by starting the shell container

docker-compose run shell

To run wp-cli in a Heroku instance, just run a temporary bash dyno.

heroku run bash

Both environments have WP-CLI available as wp.

Running tests

Travis CI will run the ci container to test your app. You can do the same locally:

docker-compose up ci

wordpress-heroku-docker-project's People

Contributors

anttiviljami avatar kgozman avatar onnimonni avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.