Browse Source

added docker-compose.yml

Fabian Peter Hammerle 5 years ago
parent
commit
da2eb06636
2 changed files with 28 additions and 0 deletions
  1. 5 0
      README.md
  2. 23 0
      docker-compose.yml

+ 5 - 0
README.md

@@ -105,3 +105,8 @@ you may need to add `--security-opt apparmor:unconfined`.
 You may need to disable user namespace remapping for containers
 (dockerd option `--userns-remap`)
 due to https://github.com/moby/moby/issues/36472 .
+
+### Docker Compose 🐙
+
+1. Adapt paths & recipient in [docker-compose.yml](docker-compose.yml)
+2. `docker-compose up`

+ 23 - 0
docker-compose.yml

@@ -0,0 +1,23 @@
+version: '2'
+
+volumes:
+  plain_data:
+
+services:
+  rgpgfs:
+    build: .
+    image: fphammerle/rgpgfs
+    environment:
+      RECIPIENT: 1234567890ABCDEF1234567890ABCDEF12345678
+    volumes:
+    - plain_data:/plain:ro
+    # TODO replace host path with named volume
+    - /mnt/rgpgfs:/encrypted:shared
+    devices: [/dev/fuse]
+    cap_add: [SYS_ADMIN]
+    security_opt: ['apparmor:unconfined']
+    # TODO investigate why some output gets lost without allocating a tty
+    tty: true
+
+# https://docs.docker.com/compose/compose-file/compose-file-v2/
+# https://docs.ansible.com/ansible/latest/modules/docker_service_module.html