docker-compose.contained.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. cap_add:
  11. - NET_ADMIN
  12. restart: always
  13. privileged: true
  14. environment:
  15. SERVER_HOST: "SERVER_PUBLIC_IP"
  16. SERVER_API_CONN_STRING: "api.NETMAKER_BASE_DOMAIN:443"
  17. SERVER_GRPC_CONN_STRING: "grpc.NETMAKER_BASE_DOMAIN:443"
  18. COREDNS_ADDR: "SERVER_PUBLIC_IP"
  19. GRPC_SSL: "on"
  20. DNS_MODE: "on"
  21. SERVER_HTTP_HOST: "api.NETMAKER_BASE_DOMAIN"
  22. SERVER_GRPC_HOST: "grpc.NETMAKER_BASE_DOMAIN"
  23. API_PORT: "8081"
  24. GRPC_PORT: "50051"
  25. CLIENT_MODE: "on"
  26. MASTER_KEY: "REPLACE_MASTER_KEY"
  27. SERVER_GRPC_WIREGUARD: "off"
  28. CORS_ALLOWED_ORIGIN: "*"
  29. DISPLAY_KEYS: "on"
  30. DATABASE: "sqlite"
  31. NODE_ID: "netmaker-server-1"
  32. ports:
  33. - "51821-51830:51821-51830/udp"
  34. - "8081:8081"
  35. - "50051:50051"
  36. netmaker-ui:
  37. container_name: netmaker-ui
  38. depends_on:
  39. - netmaker
  40. image: gravitl/netmaker-ui:v0.9.3
  41. links:
  42. - "netmaker:api"
  43. ports:
  44. - "8082:80"
  45. environment:
  46. BACKEND_URL: "https://api.NETMAKER_BASE_DOMAIN"
  47. restart: always
  48. coredns:
  49. depends_on:
  50. - netmaker
  51. image: coredns/coredns
  52. command: -conf /root/dnsconfig/Corefile
  53. container_name: coredns
  54. restart: always
  55. ports:
  56. - "COREDNS_IP:53:53/udp"
  57. - "COREDNS_IP:53:53/tcp"
  58. volumes:
  59. - dnsconfig:/root/dnsconfig
  60. caddy:
  61. image: caddy:latest
  62. container_name: caddy
  63. restart: unless-stopped
  64. network_mode: host # Wants ports 80 and 443!
  65. volumes:
  66. - /root/Caddyfile:/etc/caddy/Caddyfile
  67. # - $PWD/site:/srv # you could also serve a static site in site folder
  68. - caddy_data:/data
  69. - caddy_conf:/config
  70. mosquitto:
  71. image: eclipse-mosquitto:2.0.14
  72. container_name: broker
  73. restart: unless-stopped
  74. network_mode: host
  75. volumes:
  76. - /root/mosquitto.conf:/mosquitto/config/mosquitto.conf
  77. - mosquitto_data:/mosquitto/data
  78. - mosquitto_logs:/mosquitto/log
  79. volumes:
  80. caddy_data: {}
  81. caddy_conf: {}
  82. sqldata: {}
  83. dnsconfig: {}
  84. mosquitto_data: {}
  85. mosquitto_logs: {}