Public | Automated Build

Last pushed: 4 days ago
Short Description
Builds the raw material for your bones-theme.
Full Description

A WordPress Starter Kit for Bones with Gulp and Docker

Getting everything setup can be a real hassle. With this repo you have a complete development environment setup with one single command and you don't pollute your system with a local Wordpress and MySQL installation.

INSTALLATION

  1. Install Docker
  2. Clone this repo
  3. docker-compose up -d in the root of the cloned repo.
  4. Open localhost:3000 in your browser.
  5. Follow the process to setup WordPress.
  6. Start to make changes to the src/ files and see your browser refreshing automatically.

To get updated images you first need to pull the newest images with docker-compose pull and remove the old container with docker-compose down <service> (watch out: volume will be removed) before executing docker-compose up.

BONES

The theme in the src folder is from the Bones Starter Theme project.

UPDATE THE THEME

It was added to this repo with the subtree merge strategy. To pull the last changes from it follow this guide.

ORGANIZATION

This starter kit uses src, build, and dist folders to organize theme development:

  • src: this directory contains the raw material for your theme: templates (src/), PHP includes (src/inc), language files (src/languages), styles (src/scss), scripts (src/js), and images (anywhere under src/). Only edit files in this directory!
  • build: generated by Gulp, this is a working copy of your theme for use in development and testing.
  • dist: short for distribution, this will be the final, polished copy of your theme for production. You will need to manually run gulp dist to create a new distribution. You can also symlink this directory for a final round of testing; just keep in mind that your theme will now be in dist/[project], where [project] is the setting at the top of the Gulp configuration. This project folder is what you will want to deploy to production. (No more weird junk in your themes. Hooray!)

Note: both the build and dist directories are disposable and can be regenerated from the contents of src. You aren't likely to want to edit files in this folders but you may want to open them up to diagnose issues with the build process itself.

DOCKER

This starter kit is so easy and fast thanks to Docker.

Execute docker-compose commands in the root folder of this project.

  • Initialize: docker-compose up -d (only first time for a new project)
  • Stop: docker-compose stop
  • Start: docker-compose start
  • Restart gulp: docker-compose restart gulp
  • Show gulp logs: docker-compose logs gulp
  • Distribute: docker-compose run gulp dist
  • Deploy to remote server: docker-compose run gulp deploy
    • Make sure you have an id_rsa private key in your user/ssh folder: ~/.ssh/id_rsa
    • Make sure your public key is on the remote server
    • Configure deploy-settings in gulpconfig.js

THANKS

MAINTAINER

Made with ♥️ by Apptiva

Docker Pull Command
Owner
apptiva