Last active
July 19, 2018 23:23
-
-
Save alexbenfica/c1b8924209abfef649896c09bbbe9e18 to your computer and use it in GitHub Desktop.
Simple WordPress docker-compose.yml file. Useful to create a local devel environment
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: "3" | |
services: | |
mysql: | |
restart: always | |
image: mysql:5.5.58 | |
container_name: mysql_wordpress | |
environment: | |
MYSQL_USER: mysql | |
MYSQL_PASSWORD: mysql | |
MYSQL_ROOT_PASSWORD: your-password | |
ports: | |
- "0.0.0.0:3307:3306" | |
volumes: | |
- /home/alex/Dropbox/Devel/databases/mysql_wordpress:/var/lib/mysql | |
wordpress_devel: | |
restart: always | |
# if you have a Dockerfile, use the build below... | |
# ... and you can specify PHP and WordPress version using FROM | |
build: . | |
container_name: wordpress_devel | |
volumes: | |
- /home/alex/Dropbox/Devel/www/wordpress_devel:/var/www/html | |
ports: | |
- "0.0.0.0:8880:80" | |
environment: | |
WORDPRESS_DB_NAME: wordpress_devel | |
WORDPRESS_DB_PASSWORD: your-password | |
links: | |
- mysql:db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment