Skip to content

Solution-Agency/site-deploy

 
 

Repository files navigation

solutionagency/site-deploy

Base image to build VCS integrations enabling customers to deploy their site to WP Engine + npm and a pre-deploy script to allow for automatic building of JS.

How to Build

You can build and version this image using make targets.

make build       # Builds the image locally
make version     # Builds the image and creates version tags
make list-images # Shows all tagged versions of the image
make clean       # Deletes all tagged versions of the image

How to Run

You can use this image to deploy a site from your local machine.

  1. Build the wpengine/site-deploy:latest image with make build.
  2. Change directories into the root of the local site you'd like to deploy.
  3. Create a .env file with the following variables, changing their values as needed.

Warning

Since docker run does not strip double-quotes from variables in the .env file, we don't use them to wrap entire variable values. Instead, we must use single or double-quotes around flag values that contain whitespace to prevent splitting (--filter=':= .gitignore'). The = sign between the flag and its value is also required (--filter=':= .gitignore' rather than --filter ':= .gitignore').

WPE_ENV=yourinstall # The target WP Engine install name.
REMOTE_PATH=
SRC_PATH=.
PHP_LINT=TRUE
CACHE_CLEAR=TRUE
SCRIPT=
PREDEPLOY_SCRIPT=
FLAGS=-azvr --inplace --exclude='.*'
  1. Set an environment variable with your private SSH key, replacing the key file name with your own.
export WPE_SSHG_KEY_PRIVATE=`cat ~/.ssh/my_sshg_key_rsa`
  1. Run the deploy!
 docker run --rm \
    -e "WPE_SSHG_KEY_PRIVATE" \
    --env-file ./.env \
    -v $(pwd):/site \
    --workdir=/site \
    solutionagency/site-deploy:latest

About

WPEngine Site Deploy with added PREDEPLOY_SCRIPT, NPM and Node. Build your assets automatically!

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Languages

  • Shell 93.1%
  • Makefile 3.5%
  • PHP 1.8%
  • Dockerfile 1.6%