Skip to content

Instantly share code, notes, and snippets.

@eli-oat
Forked from tatemz/docker-wordpress.sh
Created April 26, 2018 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eli-oat/4e0d6657283471d4c9a687438c329fd8 to your computer and use it in GitHub Desktop.
Save eli-oat/4e0d6657283471d4c9a687438c329fd8 to your computer and use it in GitHub Desktop.
A quick way to get a WordPress installation up and running with Docker
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
version: "2"
services:
my-wpdb:
image: mariadb
ports:
- "8081:3306"
environment:
MYSQL_ROOT_PASSWORD: ChangeMeIfYouWant
my-wp:
image: wordpress
volumes:
- ./:/var/www/html
ports:
- "8080:80"
links:
- my-wpdb:mysql
environment:
WORDPRESS_DB_PASSWORD: ChangeMeIfYouWant
EOL
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment