Created
November 17, 2017 22:01
-
-
Save ozrabal/65e58b06acc05c2c2f268089acffe654 to your computer and use it in GitHub Desktop.
Docker compose wordpress/mariadb/phpmyadmin
This file contains hidden or 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 && cd wordpress | |
| touch docker-compose.yml | |
| cat > docker-compose.yml <<EOL | |
| version: "2" | |
| services: | |
| wpdb: | |
| image: mariadb | |
| ports: | |
| - "8081:3306" | |
| environment: | |
| MYSQL_ROOT_PASSWORD: root | |
| wp: | |
| image: wordpress | |
| volumes: | |
| - ./:/var/www/html | |
| ports: | |
| - "8080:80" | |
| links: | |
| - wpdb:mysql | |
| environment: | |
| WORDPRESS_DB_PASSWORD: root | |
| phpmyadmin: | |
| image: phpmyadmin/phpmyadmin:latest | |
| ports: | |
| - 8082:80 | |
| links: | |
| - wpdb:db | |
| EOL | |
| docker-compose up -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment