-
-
Save tecfu/ebd294b5e86c27cb294e6c495aeb1f1b to your computer and use it in GitHub Desktop.
A quick way to get a WordPress installation up and running with Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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
https://medium.com/@tatemz/local-wordpress-development-with-docker-3-easy-steps-a7c375366b9