diff options
-rw-r--r-- | docker-compose.yml | 8 | ||||
-rwxr-xr-x | hooks/post_push | 5 |
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 |