GithubHelp home page GithubHelp logo

renakdup / wp-docker-env-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 2.0 61 KB

WordPress Docker Boilerplate Environment

Dockerfile 16.56% PHP 30.00% Makefile 35.89% Shell 17.56%
wordpress wp-docker docker-environment wordpress-development wordpress-boilerplate wp-docker-boilerplate wp-installation wp wp-theme wp-environment

wp-docker-env-boilerplate's Introduction

WordPress Docker Environment Boilerplate

Local Environment Deployment


You can use this boilerplate for developing WordPress themes and plugins on your local machine by using Docker in one click.

Docker configuration:

  • Nginx 1.20
  • PHP 7.4
  • Composer > 2.1
  • MySQL 5.6
  • PhpMyAdmin 5
  • Node 16.14.2
  • WP-CLI > 2.5.0

Instructions

  1. You need to add the string to hosts file your OS:
    127.0.0.1 wp-docker-boilerplate.local
  2. Check that you use docker compose standalone.
# Check it by running command
docker-compose --version

You should see a message like this Docker Compose version v2.18.1.
In case you don't see the message, follow the instruction by the link https://docs.docker.com/compose/install/standalone/ and install docker compose standalone. 3. Run next commands

# copy & paste and fill variables
cp .env.dist .env
    
# run docker project
make d.up
    
# install dependencies
make composer.install
    
# download wordpress
make wp.core.download
  1. Visit site wp-docker-boilerplate.local

Import/Export DB

Import

You need to put on your file to ./docker/mysql/backup with the name import_db.sql, then you need to run the command make mysql.import.

Export

You need to run the command make mysql.export, then you will see the exported file by /docker/mysql/backup path.


Other cases

If you have a problems with access right for files, try using the next command for fixing it:

# It is using your user:usergroup
make fix-access-right-for FILE/DIR`

or
sudo chown USER:GROUP FILE

If you want change domain, you need to change server_name in ./docker/nginxconf.d/default.conf.

Q/A

If you get next error on MacOS
failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:20575ecebe6216036d25dab5903808211f1e9ba63dc7825ac20cb975e34cfcae: not found

create docker-compose.override.yaml in the project and add following lines:

services:
  mysql:
    platform: linux/amd64

wp-docker-env-boilerplate's People

Contributors

renakdup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

young-brain

wp-docker-env-boilerplate's Issues

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.