docker-compose.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. version: "3.4"
  2. services:
  3. netmaker:
  4. container_name: netmaker
  5. image: gravitl/netmaker:$SERVER_IMAGE_TAG
  6. env_file: ./netmaker.env
  7. restart: always
  8. volumes:
  9. - dnsconfig:/root/config/dnsconfig
  10. - sqldata:/root/data
  11. environment:
  12. # config-dependant vars
  13. - STUN_LIST=stun1.netmaker.io:3478,stun2.netmaker.io:3478,stun1.l.google.com:19302,stun2.l.google.com:19302
  14. # The domain/host IP indicating the mq broker address
  15. - BROKER_ENDPOINT=wss://broker.${NM_DOMAIN}
  16. # The base domain of netmaker
  17. - SERVER_NAME=${NM_DOMAIN}
  18. - SERVER_API_CONN_STRING=api.${NM_DOMAIN}:443
  19. # Address of the CoreDNS server. Defaults to SERVER_HOST
  20. - COREDNS_ADDR=${SERVER_HOST}
  21. # Overrides SERVER_HOST if set. Useful for making HTTP available via different interfaces/networks.
  22. - SERVER_HTTP_HOST=api.${NM_DOMAIN}
  23. # domain for your turn server
  24. - TURN_SERVER_HOST=turn.${NM_DOMAIN}
  25. # domain of the turn api server
  26. - TURN_SERVER_API_HOST=https://turnapi.${NM_DOMAIN}
  27. netmaker-ui:
  28. container_name: netmaker-ui
  29. image: gravitl/netmaker-ui:$UI_IMAGE_TAG
  30. env_file: ./netmaker.env
  31. environment:
  32. # config-dependant vars
  33. # URL where UI will send API requests. Change based on SERVER_HOST, SERVER_HTTP_HOST, and API_PORT
  34. BACKEND_URL: "https://api.${NM_DOMAIN}"
  35. depends_on:
  36. - netmaker
  37. links:
  38. - "netmaker:api"
  39. restart: always
  40. caddy:
  41. image: caddy:2.6.2
  42. container_name: caddy
  43. env_file: ./netmaker.env
  44. restart: unless-stopped
  45. extra_hosts:
  46. - "host.docker.internal:host-gateway"
  47. volumes:
  48. - ./Caddyfile:/etc/caddy/Caddyfile
  49. - ./certs:/root/certs
  50. - caddy_data:/data
  51. - caddy_conf:/config
  52. ports:
  53. - "80:80"
  54. - "443:443"
  55. coredns:
  56. container_name: coredns
  57. image: coredns/coredns
  58. command: -conf /root/dnsconfig/Corefile
  59. env_file: ./netmaker.env
  60. depends_on:
  61. - netmaker
  62. restart: always
  63. volumes:
  64. - dnsconfig:/root/dnsconfig
  65. mq:
  66. container_name: mq
  67. image: eclipse-mosquitto:2.0.15-openssl
  68. env_file: ./netmaker.env
  69. depends_on:
  70. - netmaker
  71. restart: unless-stopped
  72. command: [ "/mosquitto/config/wait.sh" ]
  73. volumes:
  74. - ./mosquitto.conf:/mosquitto/config/mosquitto.conf
  75. - ./wait.sh:/mosquitto/config/wait.sh
  76. - mosquitto_logs:/mosquitto/log
  77. - mosquitto_data:/mosquitto/data
  78. turn:
  79. container_name: turn
  80. image: gravitl/turnserver:v1.0.0
  81. env_file: ./netmaker.env
  82. environment:
  83. # config-dependant vars
  84. - USERNAME=${TURN_USERNAME}
  85. - PASSWORD=${TURN_PASSWORD}
  86. # domain for your turn server
  87. - TURN_SERVER_HOST=turn.${NM_DOMAIN}
  88. network_mode: "host"
  89. volumes:
  90. - turn_server:/etc/config
  91. restart: always
  92. volumes:
  93. caddy_data: { } # runtime data for caddy
  94. caddy_conf: { } # configuration file for Caddy
  95. sqldata: { }
  96. dnsconfig: { } # storage for coredns
  97. mosquitto_logs: { } # storage for mqtt logs
  98. mosquitto_data: { } # storage for mqtt data
  99. turn_server: { }