Created
September 16, 2016 19:54
-
-
Save cecyc/a8eb38c33e88ce338966d3e96fe036dc to your computer and use it in GitHub Desktop.
Sample Docker Compose file for a simple WordPress setup
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
version: '2' #The Docker Compose file format version to be used | |
services: | |
database: #The name of the container, you can name this whatever you want. | |
image: mysql:latest #The image you are pulling into the container | |
environment: | |
MYSQL_ROOT_PASSWORD: tacos | |
MYSQL_DATABASE: tacos | |
MYSQL_USER: tacos | |
MYSQL_PASSWORD: tacos | |
wordpress: #The name of the container, you can name this whatever you want. | |
image: wordpress:latest #Pulling latest wordpress image | |
depends_on: #Define dependencies (i.e. Wordpress needs a database) | |
- database | |
ports: #Exposing ports to access the container | |
- "8080:80" | |
environment: | |
WORDPRESS_DB_HOST: database:3306 #port 3305 for MySQL | |
WORDPRESS_DB_PASSWORD: tacos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment