dfroberg / stack-example-bedrock

Example project for running a Bedrock base WordPress site on Presslabs Stack

Home Page:https://www.presslabs.com/docs/stack/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stack-example-bedrock

Example project for running a Bedrock based WordPress site on Bitpoke Stack.

Quickstart

In order to create a similar project you need run the following commands.

$ composer create-project roots/bedrock my-site
$ cd my-site
$ composer require bitpoke/stack-mu-plugin
$ ln -sf mu-plugins/stack-mu-plugin/src/object-cache.php web/app/object-cache.php

Building docker images

Bitpoke Stack provides a base image for building and developing WordPress sites using Bedrock. The Dockerfile is as simple as:

FROM docker.io/bitpoke/wordpress-runtime:bedrock-build as builder
FROM docker.io/bitpoke/wordpress-runtime:bedrock
COPY --from=builder --chown=www-data:www-data /app /app

Development

Local development can be done as you normally do, either running php locally, or using docker or vagrant. Remember that Bedrock is configures trough environment, and for setting up you should edit .env file.

wp-cli local server

Bedrock comes configured for running WordPress trough wp-cli. To start the server you just need to run:

$ wp server

And then you can visit http://localhost:8080

docker and docker-compose

The docker-compose.yaml in this repo provides a good starting point for doing local development with docker. To boot up WordPress and MySQL server run:

$ docker-compose up -d

To install a plugin you can just:

$ docker-compose run wordpress composer require wpackagist-plugin/debug-bar

If you are using docker compose, remember that the image built from the above Dockerfile already includes nginx and it's accessible on port 8080. For customizing the environment also check https://github.com/bitpoke/stack-runtimes/blob/master/php/README.md.

About

Example project for running a Bedrock base WordPress site on Presslabs Stack

https://www.presslabs.com/docs/stack/

License:MIT License


Languages

Language:PHP 88.0%Language:Shell 9.6%Language:Dockerfile 2.3%