Giter Club home page Giter Club logo

docker-compose-wordpress-lamp's Introduction

preview.jpg

Docker Compose LAMP - WordPress

Docker Compose project to deploy development environment for WordPress. Configured to store database and files changes locally in project folder matching the purpose of completely storing project in github. Additionally empowered with database manage module and php upload config files.

Features

  • ๐Ÿ“ฆ WordPress and phpmyadmin from the box
  • ๐Ÿ“ง Ready to use Local Email Testing tool โ€“ Mailhog
  • ๐Ÿ—‚๏ธ Database and file changes storing in project folder
  • ๐Ÿš€ Commit changes to github repository

For development purpose only, don't use in production.

๐Ÿš€ Getting Started

1. Clone repository

git clone https://github.com/dendrofen/docker-compose-wordpress-lamp.git

2. Docker compose

Run docker compose in cloned project folder

docker-compose up -d

3. Start your changes

Once docker-compose run completed, modules gonna create new folders in our project folder, wait untill it's over and you can perform changes to source code or manage WordPress admin side.

install-folders-generated.png

๐Ÿ”— Interface links

Mailhog

http://localhost:8025/

PHPMyAdmin

http://localhost:8080/

type login password
Regular user user
Root user root

WordPress

http://localhost/

๐Ÿง‘๐Ÿปโ€๐Ÿ’ป WordPress Environment

Project Structure

After docker-compose run, next files structure would be created after WordPress initialized, next you can edit these files and folders to perform project changes.

Persisted wp-content

Changes per this directory would be synced with docker container as normally called - volume persistance. Your changes would be live-synced with docker container and visa-versa.

wordpress-files.png

PHP settings

.docker/uploads.ini file includes settings for php upload media limitations, and scripts processing.

โ—๏ธ Note: Reload the container to see changes (more in FAQs)

Mailhog

WordPress Must use plugins directory /wp-content/mu-plugins contains plugins mailhog-docker-support to provide Mailhog module support for WordPress. As far this is mu-plugin, so it run in WordPress by default. You can not disable this plugin, but just remove from your project.

โ—๏ธ Note: This plugin override settings of WordPress phpmailer

๐Ÿง‘๐Ÿปโ€๐Ÿ’ป Database Data

Local storing

Database data files stored locally in mariadb project folder. All changes between database would be stored in this folder, so you are free to use this folder as database backup for container.

Commiting state

More info about commiting database state here or in FAQs

โ—๏ธ Note: Stop the container, before commiting database to github.

๐Ÿ›Ÿ FAQs

๐Ÿ”ท Why default themes and plugins not commited to github?

There is .gitignore file configured to remove these items from repository. See below question.

๐Ÿ”ท WordPress default themes and plugins appears on container after been removed?

WordPress default themes and default plugins will appear in container each time docker-compose up command will be processed, because of WordPress latest version installation per each container construction. You can avoide such actions, using just docker-compose start and docker-compose stop. There is also .gitignore config to prevent these items to be commited.

๐Ÿ”ท PHP upload config updated, but no changes?

Changes will appear after container restart:

docker-compose restart

๐Ÿ”ท Can project changes being stored on github and reuse on another device with docker?

Yes, and this is exactly what this repository is made for. There is small guide how to correctly push changes using this project stack.

Store changes using Github

docker-compose-wordpress-lamp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

webrulon

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.