浏览代码

Merge pull request #1566 from infosiftr/wordpress-volumes

Add explicit volumes to WordPress stack example
yosifkit 6 年之前
父节点
当前提交
7c9943d512
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      wordpress/stack.yml

+ 8 - 0
wordpress/stack.yml

@@ -12,6 +12,8 @@ services:
       WORDPRESS_DB_USER: exampleuser
       WORDPRESS_DB_PASSWORD: examplepass
       WORDPRESS_DB_NAME: exampledb
+    volumes:
+      - wordpress:/var/www/html
 
   db:
     image: mysql:5.7
@@ -21,3 +23,9 @@ services:
       MYSQL_USER: exampleuser
       MYSQL_PASSWORD: examplepass
       MYSQL_RANDOM_ROOT_PASSWORD: '1'
+    volumes:
+      - db:/var/lib/mysql
+
+volumes:
+  wordpress:
+  db: