2
0

docker-compose.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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} # For EMQX broker use `BROKER_ENDPOINT=wss://broker.${NM_DOMAIN}/mqtt`
  16. # For EMQX broker (uncomment the two lines below)
  17. #- BROKER_TYPE=emqx
  18. #- EMQX_REST_ENDPOINT=http://mq:18083
  19. # The base domain of netmaker
  20. - SERVER_NAME=${NM_DOMAIN}
  21. - SERVER_API_CONN_STRING=api.${NM_DOMAIN}:443
  22. # Address of the CoreDNS server. Defaults to SERVER_HOST
  23. - COREDNS_ADDR=${SERVER_HOST}
  24. # Overrides SERVER_HOST if set. Useful for making HTTP available via different interfaces/networks.
  25. - SERVER_HTTP_HOST=api.${NM_DOMAIN}
  26. netmaker-ui:
  27. container_name: netmaker-ui
  28. image: gravitl/netmaker-ui:$UI_IMAGE_TAG
  29. env_file: ./netmaker.env
  30. environment:
  31. # config-dependant vars
  32. # URL where UI will send API requests. Change based on SERVER_HOST, SERVER_HTTP_HOST, and API_PORT
  33. BACKEND_URL: "https://api.${NM_DOMAIN}"
  34. depends_on:
  35. - netmaker
  36. links:
  37. - "netmaker:api"
  38. restart: always
  39. caddy:
  40. image: caddy:2.8.4
  41. container_name: caddy
  42. env_file: ./netmaker.env
  43. restart: unless-stopped
  44. extra_hosts:
  45. - "host.docker.internal:host-gateway"
  46. volumes:
  47. - ./Caddyfile:/etc/caddy/Caddyfile
  48. - caddy_data:/data
  49. - caddy_conf:/config
  50. ports:
  51. - "80:80"
  52. - "443:443"
  53. coredns:
  54. #network_mode: host
  55. container_name: coredns
  56. image: coredns/coredns:1.10.1
  57. command: -conf /root/dnsconfig/Corefile
  58. env_file: ./netmaker.env
  59. restart: always
  60. depends_on:
  61. - netmaker
  62. volumes:
  63. - dnsconfig:/root/dnsconfig
  64. mq:
  65. container_name: mq
  66. image: eclipse-mosquitto:2.0.15-openssl
  67. env_file: ./netmaker.env
  68. depends_on:
  69. - netmaker
  70. restart: unless-stopped
  71. command: [ "/mosquitto/config/wait.sh" ]
  72. volumes:
  73. - ./mosquitto.conf:/mosquitto/config/mosquitto.conf
  74. - ./wait.sh:/mosquitto/config/wait.sh
  75. - mosquitto_logs:/mosquitto/log
  76. - mosquitto_data:/mosquitto/data
  77. volumes:
  78. caddy_data: { } # runtime data for caddy
  79. caddy_conf: { } # configuration file for Caddy
  80. sqldata: { }
  81. dnsconfig: { } # storage for coredns
  82. mosquitto_logs: { } # storage for mqtt logs
  83. mosquitto_data: { } # storage for mqtt data