Created
October 20, 2018 06:53
-
-
Save shinshin86/b1609a875fc5f879a14c1f8ea65292e8 to your computer and use it in GitHub Desktop.
Create development environment of wordpress using docker compose.
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
version: '3.7' | |
services: | |
wordpress: | |
image: wordpress | |
restart: always | |
container_name: 'app-conatiner-name' | |
ports: | |
- 8080:80 | |
environment: | |
- WORDPRESS_DB_NAME=databasename | |
- WORDPRESS_DB_PASSWORD=password | |
mysql: | |
restart: always | |
image: mysql:5.7 | |
container_name: 'db-contaner-name' | |
ports: | |
- 3306:3306 | |
volumes: | |
- ./datadir/mysql:/var/lib/mysql | |
environment: | |
- MYSQL_USER=root | |
- MYSQL_PASSWORD=password | |
- MYSQL_ROOT_PASSWORD=password | |
- MYSQL_DATABASE=databasename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment