aboutsummaryrefslogtreecommitdiff
path: root/examples/example6
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2019-01-14 20:41:52 -0700
committerCody Hiar <codyfh@gmail.com>2019-01-14 20:41:52 -0700
commite1c3d2ec14c1617fc779bccfdb64b4c09bdc6525 (patch)
tree08a2c3eaa0516cb2d2f984c01721bb457222b13b /examples/example6
parenta69b96fe168a05792288ef2e186a86e6540f85bd (diff)
Alpha Version
Diffstat (limited to 'examples/example6')
-rw-r--r--examples/example6/docker-compose.yml23
-rwxr-xr-xexamples/example6/example6.sh18
2 files changed, 41 insertions, 0 deletions
diff --git a/examples/example6/docker-compose.yml b/examples/example6/docker-compose.yml
new file mode 100644
index 0000000..082697c
--- /dev/null
+++ b/examples/example6/docker-compose.yml
@@ -0,0 +1,23 @@
+version: '3.1'
+
+services:
+
+ wordpress:
+ image: wordpress
+ restart: always
+ ports:
+ - 8000:80
+ environment:
+ WORDPRESS_DB_HOST: db
+ WORDPRESS_DB_USER: exampleuser
+ WORDPRESS_DB_PASSWORD: examplepass
+ WORDPRESS_DB_NAME: exampledb
+
+ db:
+ image: mysql:5.7
+ restart: always
+ environment:
+ MYSQL_DATABASE: exampledb
+ MYSQL_USER: exampleuser
+ MYSQL_PASSWORD: examplepass
+ MYSQL_RANDOM_ROOT_PASSWORD: '1'
diff --git a/examples/example6/example6.sh b/examples/example6/example6.sh
new file mode 100755
index 0000000..9078da1
--- /dev/null
+++ b/examples/example6/example6.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+# vim: set filetype=sh
+#
+# Author: Cody Hiar
+# Date: 2019-01-15
+#
+# Description: run docker-compose command
+#
+# Set options:
+# e: Stop script if command fails
+# u: Stop script if unset variable is referenced
+# x: Debug, print commands as they are executed
+# o pipefail: If any command in a pipeline fails it all fails
+#
+set -exuo pipefail
+
+# Run the compose file
+docker-compose up