Coder Social home page Coder Social logo

readymadehost / wordpress-dev-docker Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 87 KB

A development docker for every wordpress project

License: MIT License

Dockerfile 75.05% Shell 24.95%
wordpress development docker docker-setup development-docker phpstorm container-vscode

wordpress-dev-docker's Introduction

Wordpress dev docker

A development docker for every wordpress project

Features

  • Build for wordpress and has cli tools
  • Bundle of fpm, cli, nginx, mariadb, phpmyadmin and redis containers
  • PHP 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 and 8.1 supported
  • Database mariadb 10.x, mongodb 4.x ... supported
  • Node 14.x, 16.x, 17.x, 18.x, ... supported
  • Included wp, composer and node cli
  • Support for PhpStorm or VSCode + WSL2/docker-desktop setup
  • Support for xdebug included check .env file

Docker setup

  • git clone https://github.com/readymadehost/wordpress-dev-docker.git project-docker
  • cd project-docker
  • mkdir project or git clone <some_git_repo_url> project for existing project
  • cp .env.sample .env and review .env file
  • docker-compose build
  • docker-compose up -d
  • docker-compose exec cli bash
  • wp --allow-root config list for config list

New wordpress project install

  • Download zip from official website and put wp code inside project dir
  • Follow gui wordpress install

Notes

  • Project URL: http://{localhost/any_valid_host}:8080/
  • PhpMyAdmin URL: http://{localhost/any_valid_host}:8180/
  • For more info and change, check .env and docker-compose.yml
  • Manage permission inside container using bash alias mpp or /root/manage-project-permission.sh
  • Mariadb default:- host: mariadb user: root, password: root, database_name: project
- <docker_root_dir> <-- docker root dir
- <docker_root_dir>/data <-- all docker data persist
- <docker_root_dir>/nginx <-- nginx
- <docker_root_dir>/php* <-- php cli and fpm containers
- <docker_root_dir>/.env <-- docker environment configuration

- <docker_root_dir>/project <-- project root dir

- <docker_root_dir>/project* <-- added in .gitignore
- <docker_root_dir>/*.sql <-- added in .gitignore

Phpstorm

Simply add remote docker php cli interpreter, change path mapping and configure remote interpreter everywhere.

Remote container extension + vscode

With vscode's remote container extension, we can simply connect into cli container.

Pre build docker image

  • readymadehost/wordpress-dev-docker-php{PHP_VERSION}-cli:latest
  • readymadehost/wordpress-dev-docker-php{PHP_VERSION}-fpm:latest

Quick Link

wordpress-dev-docker's People

Contributors

susonwaiba avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.