ansible-playbook.yml 653 B

123456789101112131415161718192021222324
  1. - hosts: [some-host]
  2. become: true
  3. tasks:
  4. - docker_container:
  5. name: onion_service
  6. # TODO replace with fingerprint
  7. image: fphammerle/onion-service:2.0.0-tor0.4.3.5-amd64
  8. env:
  9. VIRTUAL_PORT: 80
  10. TARGET: 1.2.3.4:8080
  11. volumes:
  12. - onion_service_data:/var/lib/tor
  13. - onion_service_key:/onion-service
  14. mounts:
  15. - type: tmpfs
  16. target: /tmp # torrc
  17. # nosuid,nodev,noexec added by default
  18. tmpfs_mode: '1777'
  19. tmpfs_size: 4k
  20. read_only: yes
  21. cap_drop: [ALL]
  22. security_opts: [no-new-privileges]
  23. memory: 128M
  24. restart_policy: unless-stopped