docker-compose.yml 705 B

1234567891011121314151617181920212223242526272829303132333435
  1. version: '2.3'
  2. volumes:
  3. data:
  4. key:
  5. services:
  6. onion:
  7. build: .
  8. image: fphammerle/onion-service
  9. volumes:
  10. - type: volume
  11. source: data
  12. target: /var/lib/tor
  13. - type: volume
  14. source: key
  15. target: /onion-service
  16. - type: tmpfs
  17. target: /tmp # torrc
  18. tmpfs:
  19. # nosuid,nodev,noexec added by default
  20. mode: '1777'
  21. size: 4k
  22. read_only: yes
  23. environment:
  24. VIRTUAL_PORT: 80
  25. TARGET: 1.1.1.1:80
  26. #NON_ANONYMOUS_SINGLE_HOP_MODE: 1
  27. cap_drop: [ALL]
  28. security_opt: [no-new-privileges]
  29. cpus: 0.5
  30. mem_limit: 128m
  31. restart: unless-stopped
  32. # https://docs.docker.com/compose/compose-file/compose-file-v2/