docker-compose.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. version: '2'
  2. services:
  3. # Example application container, this is where your data is.
  4. app:
  5. image: alpine:3.5
  6. # Simulate an application server with an endless loop.
  7. command: sh -c 'while true; do sleep 10; done';
  8. volumes:
  9. - ./data:/data:ro
  10. # RSYNCD Server
  11. rsyncd:
  12. build: .
  13. image: mickaelperrin/rsyncd-server:latest
  14. environment:
  15. # Optional: For user/password authentication
  16. # - USERNAME=dragonos
  17. # - PASSWORD=dragonos
  18. # REQUIRED: Should be the same as the volume mapping of app container
  19. - VOLUME_PATH=/data
  20. # OPTIONAL: If you want to restrict access to the volume in read only mode. (default false)
  21. - READ_ONLY=true
  22. # OPTIONAL: If you want to chroot the use of rsync. Be sure that your directory structure is compatible.
  23. # See documentation
  24. # (default no)
  25. - CHROOT=no
  26. # OPTIONAL: customize the volume name in rsync (default: volume)
  27. - VOLUME_NAME=pub
  28. # OPTIONAL: restrict connection from (default: 0.0.0.0/0)
  29. - HOSTS_ALLOW=0.0.0.0/0
  30. # OPTIONAL: define the user name or user ID that file transfers to and from that module should take place
  31. # (default set to UID owner of VOLUME_PATH)
  32. # - OWNER_ID = 1000
  33. # OPTIONAL: specifies one or more group names/IDs that will be used when accessing the module. The first one will be the default group, and any extra ones be set as supplemental groups.
  34. # (default set to GID owner of VOLUME_PATH)
  35. # - GROUP_ID = 1000
  36. ports:
  37. - 873:873
  38. volumes_from:
  39. - app