From 88c3b5c00ef3d7692637a4db152cf66760095d6e Mon Sep 17 00:00:00 2001
From: Einar Forselv <eforselv@gmail.com>
Date: Sat, 13 Apr 2019 23:59:54 +0200
Subject: [PATCH] Quick example compose yaml

---
 README.md | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/README.md b/README.md
index 942f389..886eda9 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,37 @@ This includes both host mapped volumes and actual docker volumes.
 
 ## Configuration
 
+Required env variables for restic:
+
 ```bash
 RESTIC_REPOSITORY
 RESTIC_PASSWORD
 ```
+
+Example compose setup:
+
+```yaml
+version: '3'
+services:
+  backup:
+    build: restic-volume-backup
+    environment:
+      - RESTIC_REPOSITORY=<whatever restic supports>
+      - RESTIC_PASSWORD=hopefullyasecturepw
+    env_file:
+      - some_other_vars.env
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock:ro
+  some_service:
+    image: some_image
+    # Enable volume backup with label
+    labels:
+      restic-volume-backup.enabled: true
+    # These volumes will be backed up
+    volumes:
+      media:/srv/media
+      /srv/files:/srv/files
+
+volumes:
+  media:
+```
\ No newline at end of file