Giter Site home page Giter Site logo

premise-wp's Introduction

Premise WP Docker Environment

This idea is for us to have a very easy to set up WP environment which both clients and devs will also be able to run locally on their own machines, with identical environments, needing only to install docker.

Setup

  1. Install docker.

  2. If it's a new project, create a secrets/ directory in the root and add a new .txt file there for each relevant environment variable (see docker-compose). Otherwise, request the secrets/ from the project manager and store it in the root.

  3. cd to the project directory and run docker-compose to fetch and start the images.

$ cd /your/path/to/premise-wp
$ docker-compose up

This could take some time to run, depending on your internet speed...

Notice

You can close and restart docker and the containers, and the database will persist. Running

$ docker-compose down --volumes

will remove the database

Usage

  • Visit http://localhost:8000 to view the site, or to complete the 5 minute installation if this is a new project.

  • Visit http://localhost:8080 to open phpmyadmin. You can do everything you want here as you normally would on a MAMP installation.

    The db data is stored as a volume, meaning it actually lives on your local machine, not within the container, and docker just has its own access to it. This gives us the ability to safely restart the mysql container without losing anything.

Development

  • wp-content is stored as a volume, so effectively it will stay in sync inside and outside the container. It actually lives outside the container (in the project root), so deleting the container or the image won't affect it.

    Beware: Reinstalling or updating the wp core could overwrite wp-content. Make sure you have it backed up and saved in a different location before running anything that will affect the wp core.

    Since wp-content is a volume, we can make changes to it either manually or via Wordpress (eg by installing a plugin) and it will always stay in sync.

Resources

premise-wp's People

Contributors

mattwills8 avatar

Watchers

James Cloos avatar  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.