summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael <raphaelkabo@gmail.com>2020-11-05 10:33:58 +0000
committerGitHub <noreply@github.com>2020-11-05 10:33:58 +0000
commit050701f4af059f3c93bee3a973028e7e3ba3b16b (patch)
treeb8e8e4bfe6cbfbf8c79b253c7803c1eeef2b4008
parent6eae89562c56aa5d2b6fcd8435c2f85089b316b0 (diff)
parentb514609f4fa319491d1956205d98012b5fc59d9d (diff)
Merge pull request #53 from marklechtermann/volume
Added docker volume support for MongoDB
-rw-r--r--docker-compose.yml8
-rwxr-xr-xhooks/post_push5
2 files changed, 12 insertions, 1 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index d16e279..44026c8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,4 +1,8 @@
version: '3'
+
+volumes:
+ mongodb_data_db:
+
services:
gathio:
build: .
@@ -7,4 +11,6 @@ services:
ports:
- 3000:3000
mongo:
- image: mongo:latest \ No newline at end of file
+ image: mongo:latest
+ volumes:
+ - mongodb_data_db:/data/db \ No newline at end of file
diff --git a/hooks/post_push b/hooks/post_push
new file mode 100755
index 0000000..c3a2958
--- /dev/null
+++ b/hooks/post_push
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+SHORTHASH="$(git rev-parse --short HEAD)"
+docker tag $IMAGE_NAME $DOCKER_REPO:$SHORTHASH
+docker push $DOCKER_REPO:$SHORTHASH \ No newline at end of file