Code Monkey home page Code Monkey logo

docker-compose-wordpress's Introduction

docker-compose-wordpress

A simple docker-compose YAML for quickly running WordPress

Using This Script

Reference it in your Git Repository

$ git submodule add [email protected]:brainbytes/docker-compose-wordpress.git

Run It

$ cd docker-compose-wordpress
docker-compose up -d

The first time you run this, it might take a while to load especially if you haven't already downloaded the images. The next time will be WAY faster though.

Using WP-CLI

Use docker exec <containername> wp, for example docker exec <containername> wp theme install quark. See the WP-CLI Docs for more info.

If you're creating a development environment from production data, the wp search-replace command may be useful, for example:

docker exec <containername> wp search-replace 'http://www.production-url.com' 'http://localhost:8000'
docker exec <containername> wp search-replace 'https://www.production-url.com' 'http://localhost:8000'

Shut it Down

docker-compose down

Other Useful Information

Open a Bash Shell

docker ps
sudo docker exec -it [container name or id] bash

On Windows:

docker ps
winpty docker exec -it [container name or id] bash

To Install docker

On Window:

Download here and be sure to read about the prerequisites. Can't get it working? Try running this PowerShell script to diagnose common issues.

On MacOS:

Download here and have fun. It's easier to get Docker going on MacOS than Windows.

  1. Google it
  2. Follow the instructions you found

Quick Note About Windows

You must enable sharing for your local drive in Docker settings -> Shared Drives before volume persistance works.

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.