0.11.2 ā€¢ Published 2 years ago

docker-wordpress-scripts v0.11.2

Weekly downloads
5
License
MIT
Repository
github
Last release
2 years ago

Docker WordPress Scripts

āœØ This project is not under active development. It may not work with the latest Docker. Future DWS updates uncertain at this time. āœØ


šŸ¤– Docker WordPress Scripts

npm version

DWS is a small set of scripts to manage WordPress containers in Docker. It uses a Traefik docker network for *.localhost domains to avoid manual port assignment.

This is work in progress and unstable!

This is somewhat of a personal project but it solves a fairly common problem so I'm sharing it for anyone to use and adapt. Follow @dbushell for updates and feedback.

Requirements

Install

Run npm init if you don't have a package.json.

Install docker-wordpress-scripts to the project repository:

npm install docker-wordpress-scripts --save

Or use the --global flag to use dws commands anywhere without npx.

Usage

Usage: dws <command> [options]

Commands:
  dws up            spin up a new project
  dws stop          stop running containers
  dws start         start existing containers
  dws url           output the *.localhost URL
  dws down          stop and remove existing containers
  dws eject         replace DWS dependency with config files

Options:
  --help, -h     Show help
  --version, -v  Show version number

up

npx dws up

DWS will spin up new Docker containers and install WordPress. You'll be asked a few configuration values.

Once successful you'll see:

šŸ¤– Success: WordPress is up and running!
phpMyAdmin: āžœ http://pma.wordpress.localhost
WordPress:  āžœ http://wordpress.localhost
WordPress (auto login):  āžœ http://wordpress.localhost/wp-auto-login.php

The wp-content directory is mounted to wordpress in the project repository.

stop

npx dws stop

Stop all running containers for the project.

start

npx dws start

Start all existing containers for the project.

url

npx dws url

Output the *.localhost URL for the project.

down

npx dws down

Stop and remove all containers and volumes for the project leaving no trace in Docker. The WordPress content directories will persist in the project repository.

eject

npx dws eject

Remove the DWS dependency. There is no going back! This adds a copy of docker-compose.yml and other config files to the project repository. You can continue by using docker-compose in the terminal.

The hostname & port for WordPress and phpMyAdmin moves to respectively:

localhost:8080
localhost:8081

NGINX and Portainer

See v0.9.1 for older configurations.


MIT License | Copyright Ā© 2021 David Bushell | @dbushell

0.11.1

2 years ago

0.11.2

2 years ago

0.11.0

3 years ago

0.10.2

3 years ago

0.10.3

3 years ago

0.10.4

3 years ago

0.10.1

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago

0.8.9

4 years ago

0.8.10

4 years ago

0.8.8

4 years ago

0.8.7

4 years ago

0.8.6

4 years ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.5.0

4 years ago

0.6.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago