Skip to content

Instantly share code, notes, and snippets.

@anoochit
Created February 24, 2016 15:16
Show Gist options
  • Save anoochit/1b7fc4495e1fb34a5152 to your computer and use it in GitHub Desktop.
Save anoochit/1b7fc4495e1fb34a5152 to your computer and use it in GitHub Desktop.
wordpress compose file v2 with docker volume
version: '2'
services:
db:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=mypass
volumes:
- db-data:/var/log/mysql
wp:
image: wordpress
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_PASSWORD=mypass
volumes:
- wp-data:/var/www/html
ports:
- 80:80
volumes:
db-data:
driver: local
wp-data:
driver: local
@behroozhussaini
Copy link

Hi
I would like to mount a folder from /mnt/wp-content to wp-content and /mnt/db-data instead of a volume how can I do that thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment