Last active
May 21, 2018 03:21
-
-
Save rutcreate/45bb243bbb16b7b4bb59c6022c0446a1 to your computer and use it in GitHub Desktop.
Basic WordPress 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' | |
| services: | |
| wordpress: | |
| image: wordpress:latest | |
| ports: | |
| - 8888:80 | |
| volumes: | |
| - ./html:/var/www/html | |
| environment: | |
| WORDPRESS_DB_PASSWORD: example | |
| mysql: | |
| image: mysql:5.7 | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| environment: | |
| MYSQL_ROOT_PASSWORD: example | |
| volumes: | |
| db_data: |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Setup
cd <your-project-directory>docker-compose.ymlto your project directory.mkdir htmlat the same level ofdocker-compose.ymlyour-project-directory--
docker-compose.yml--
htmlRun Docker
Dockerdocker-compose up -d(for daemon mode) ordocker-compose up.docker stack deploy -c docker-compose.yml <project-name>