Skip to content

danieletulone/docker-wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Wordpress

General purpose docker compose files for developing wordpress sites, themes, plugins.

Requirements

  • docker

  • watchman

    If you are new to watchman:

    watches files and records, or triggers actions, when they change.

    In this repo, it is used by link:* and unlink:* commands/scripts because docker volume api do not work with symbolic links. So the link-like strategy is "watch and rsync".

Get Started

NOTE: Every command can be executed manually or using the sh scripts wrapper (the cli file). To use the cli.sh file you should to run this command: chmod +x cli

  1. Clone this repo:

    • Manually:

      git clone git@github.com:danieletulone/docker-wordpress.git
    • Using sh wrapper: No wrap command for clone

  2. Create .env file copying .env.example file:

    • Manually:

      cp .env.example .env
    • Using sh wrapper:

      ./cli install
  3. (optional) Symlink your theme(s) or create folders into volumes.

    • Manually:

      link -s path/themes/example ./volumes/wordpress/themes
    • Using sh wrapper:

      ./cli link:theme path/themes/example
  4. (optional) Symlink your plugin(s) or create folders into volumes.

    • Manually:

      link -s path/themes/example ./volumes/wordpress/themes
    • Using sh wrapper:

      ./cli link:plugin path/plugins/example

Commands

Clean

Usage

./cli clean

Description

Stop containers and remove volumes.

Options

You can pass every option of down command of docker compose.


Install

Usage

./cli install

Description

Install necessary things to allow to use correctly the docker-wordpress.

Options

No options.


Link Theme

Usage

./cli link:theme my-theme-path

Description

Run a watcher for source directory and rsync it into ./volumes/wordpress/themes.

Internally, it use watchman because docker volume api do not work with symbolic links. So the link-like strategy is "watch and rsync".

Use unlink:theme to unlink.

Options

No options.


Link Plugin

Usage

./cli link:plugin my-theme-path

Description

Run a watcher for source directory and rsync it into ./volumes/wordpress/plugins.

Internally, it use watchman because docker volume api do not work with symbolic links. So the link-like strategy is "watch and rsync".

Use unlink:plugin to unlink.

Options

No options.


Start

Usage

./cli start

Description

Install necessary things to allow to use correctly the docker-wordpress.

Options

You can pass every option of up command of docker compose.


Stop

Usage

./cli stop

Description

Install necessary things to allow to use correctly the docker-wordpress.

Options

You can pass every option of down command of docker compose.


Unlink Plugin

Usage

./cli unlink:plugin my-theme-path

Description

Stop the watcher for source directory and remove directory from ./volumes/wordpress/plugins.

Options

No options.


Unlink theme

Usage

./cli unlink:theme my-theme-path

Description

Stop the watcher for source directory and remove directory from ./volumes/wordpress/themes.

Options

No options.

Platform Compatibility

The start script handles automatically that for you and merges (or not) multiple docker-compose files. Tested on MacOs with M2.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages