docker-compose.hostnetwork.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. version: "3.4"
  2. services:
  3. netmaker:
  4. container_name: netmaker
  5. image: gravitl/netmaker:v0.9.4
  6. volumes:
  7. - dnsconfig:/root/config/dnsconfig
  8. - /usr/bin/wg:/usr/bin/wg
  9. - sqldata:/root/data
  10. - /run/xtables.lock:/run/xtables.lock
  11. cap_add:
  12. - NET_ADMIN
  13. - NET_RAW
  14. - SYS_MODULE
  15. network_mode: host
  16. restart: always
  17. environment:
  18. SERVER_HOST: "SERVER_PUBLIC_IP"
  19. SERVER_API_CONN_STRING: "api.NETMAKER_BASE_DOMAIN:443"
  20. SERVER_GRPC_CONN_STRING: "grpc.NETMAKER_BASE_DOMAIN:443"
  21. COREDNS_ADDR: "SERVER_PUBLIC_IP"
  22. GRPC_SSL: "on"
  23. DNS_MODE: "on"
  24. SERVER_HTTP_HOST: "api.NETMAKER_BASE_DOMAIN"
  25. SERVER_GRPC_HOST: "grpc.NETMAKER_BASE_DOMAIN"
  26. API_PORT: "8081"
  27. GRPC_PORT: "50051"
  28. CLIENT_MODE: "on"
  29. MASTER_KEY: "REPLACE_MASTER_KEY"
  30. SERVER_GRPC_WIREGUARD: "off"
  31. CORS_ALLOWED_ORIGIN: "*"
  32. DISPLAY_KEYS: "on"
  33. DATABASE: "sqlite"
  34. HOST_NETWORK: "on"
  35. NODE_ID: "netmaker-server-1"
  36. MANAGE_IPTABLES: "on"
  37. PORT_FORWARD_SERVICES: ""
  38. VERBOSITY: "1"
  39. netmaker-ui:
  40. container_name: netmaker-ui
  41. depends_on:
  42. - netmaker
  43. image: gravitl/netmaker-ui:v0.9.3
  44. links:
  45. - "netmaker:api"
  46. ports:
  47. - "8082:80"
  48. environment:
  49. BACKEND_URL: "https://api.NETMAKER_BASE_DOMAIN"
  50. restart: always
  51. coredns:
  52. depends_on:
  53. - netmaker
  54. image: coredns/coredns
  55. command: -conf /root/dnsconfig/Corefile
  56. container_name: coredns
  57. restart: always
  58. ports:
  59. - "53053:53/udp"
  60. - "53053:53/tcp"
  61. volumes:
  62. - dnsconfig:/root/dnsconfig
  63. caddy:
  64. image: caddy:latest
  65. container_name: caddy
  66. restart: unless-stopped
  67. network_mode: host # Wants ports 80 and 443!
  68. volumes:
  69. - /root/Caddyfile:/etc/caddy/Caddyfile
  70. # - $PWD/site:/srv # you could also serve a static site in site folder
  71. - caddy_data:/data
  72. - caddy_conf:/config
  73. volumes:
  74. caddy_data: {}
  75. caddy_conf: {}
  76. sqldata: {}
  77. dnsconfig: {}