docker-compose.yml 676 B

123456789101112131415161718192021222324252627282930313233
  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. # nosuid,nodev,noexec added by default
  19. tmpfs: {size: 4k}
  20. read_only: yes
  21. environment:
  22. VIRTUAL_PORT: 80
  23. TARGET: 1.1.1.1:80
  24. #NON_ANONYMOUS_SINGLE_HOP_MODE: 1
  25. cap_drop: [ALL]
  26. security_opt: [no-new-privileges]
  27. cpus: 0.5
  28. mem_limit: 128m
  29. restart: unless-stopped
  30. # https://docs.docker.com/compose/compose-file/compose-file-v2/