Skip to content

Instantly share code, notes, and snippets.

@sujal
Last active December 20, 2015 13:16
Show Gist options
  • Save sujal/556407cdd9bcf5d52bcf to your computer and use it in GitHub Desktop.
Save sujal/556407cdd9bcf5d52bcf to your computer and use it in GitHub Desktop.
This is my docker-compose file for local development
dataContainer:
image: tianon/true
volumes:
- /var/www/html
- /var/lib/mysql
- /sslcerts:/sslcerts
web:
build: .
mysql:
image: mysql:5.7
web:
build: .
env_file: .env-production
ports:
- "80:80"
- "443:443"
links:
- db:mysql
restart: always
volumes_from:
- dataContainer
db:
extends:
file: common.yml
service: mysql
env_file: .env-production
restart: always
volumes_from:
- dataContainer
dataContainer:
extends:
file: common.yml
service: dataContainer
web:
image: wordpress:latest
env_file: .env
volumes:
- ./wordpress/wp-content/themes/iA4/:/var/www/html/wp-content/themes/iA4/
- ./wordpress/wp-content/themes/sujaldotcom-iA4-child/:/var/www/html/wp-content/themes/sujaldotcom-iA4-child/
ports:
- "4510:80"
- "4511:443"
links:
- mysql:mysql
volumes_from:
- dataContainer
mysql:
extends:
file: common.yml
service: mysql
env_file: .env
volumes_from:
- dataContainer
dataContainer:
extends:
file: common.yml
service: dataContainer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment