Last active
March 23, 2017 02:31
-
-
Save jimfrenette/d97430cdb69ae0b361c91271c1593bca to your computer and use it in GitHub Desktop.
two wordpress sites, nginx-proxy, mariadb, and phpmyadmin. uses official WordPress container from hub.docker.com
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" | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
container_name: nginx-proxy | |
ports: | |
- "80:80" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
db: | |
image: mariadb | |
volumes: | |
- mysql:/var/lib/mysql | |
ports: | |
- "8001:3306" | |
environment: | |
- MYSQL_ROOT_PASSWORD=secret | |
phpmyadmin: | |
image: phpmyadmin/phpmyadmin:latest | |
ports: | |
- "8002:80" | |
links: | |
- db:mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=secret | |
- VIRTUAL_HOST=phpmyadmin.app | |
- VIRTUAL_PORT=8002 | |
wp1: | |
image: wordpress | |
volumes: | |
- ./wp1:/var/www/html | |
ports: | |
- "8003:80" | |
links: | |
- db:mysql | |
environment: | |
- WORDPRESS_DB_NAME=wp1 | |
- WORDPRESS_DB_PASSWORD=secret | |
- VIRTUAL_HOST=wp1.dev | |
- VIRTUAL_PORT=8003 | |
wp2: | |
image: wordpress | |
volumes: | |
- ./wp2:/var/www/html | |
ports: | |
- "8004:80" | |
links: | |
- db:mysql | |
environment: | |
- WORDPRESS_DB_NAME=wp2 | |
- WORDPRESS_DB_PASSWORD=secret | |
- VIRTUAL_HOST=wp2.dev | |
- VIRTUAL_PORT=8004 | |
volumes: | |
mysql: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hosts