docker-compose.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. version: "3.4"
  2. services:
  3. netmaker:
  4. container_name: netmaker
  5. image: gravitl/netmaker:v0.14.1
  6. volumes:
  7. - dnsconfig:/root/config/dnsconfig
  8. - sqldata:/root/data
  9. - /root/certs:/etc/netmaker/
  10. cap_add:
  11. - NET_ADMIN
  12. - NET_RAW
  13. - SYS_MODULE
  14. sysctls:
  15. - net.ipv4.ip_forward=1
  16. - net.ipv4.conf.all.src_valid_mark=1
  17. - net.ipv6.conf.all.disable_ipv6=0
  18. - net.ipv6.conf.all.forwarding=1
  19. restart: always
  20. environment:
  21. SERVER_NAME: "broker.NETMAKER_BASE_DOMAIN"
  22. SERVER_HOST: "SERVER_PUBLIC_IP"
  23. SERVER_API_CONN_STRING: "api.NETMAKER_BASE_DOMAIN:443"
  24. COREDNS_ADDR: "SERVER_PUBLIC_IP"
  25. DNS_MODE: "on"
  26. SERVER_HTTP_HOST: "api.NETMAKER_BASE_DOMAIN"
  27. API_PORT: "8081"
  28. CLIENT_MODE: "on"
  29. MASTER_KEY: "REPLACE_MASTER_KEY"
  30. CORS_ALLOWED_ORIGIN: "*"
  31. DISPLAY_KEYS: "on"
  32. DATABASE: "sqlite"
  33. NODE_ID: "netmaker-server-1"
  34. MQ_HOST: "mq"
  35. HOST_NETWORK: "off"
  36. VERBOSITY: "1"
  37. MANAGE_IPTABLES: "on"
  38. PORT_FORWARD_SERVICES: "dns"
  39. ports:
  40. - "51821-51830:51821-51830/udp"
  41. netmaker-ui:
  42. container_name: netmaker-ui
  43. depends_on:
  44. - netmaker
  45. image: gravitl/netmaker-ui:v0.14.1
  46. links:
  47. - "netmaker:api"
  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. volumes:
  59. - dnsconfig:/root/dnsconfig
  60. caddy:
  61. image: caddy:latest
  62. container_name: caddy
  63. restart: unless-stopped
  64. ports:
  65. - "80:80"
  66. - "443:443"
  67. volumes:
  68. - /root/Caddyfile:/etc/caddy/Caddyfile
  69. # - $PWD/site:/srv # you could also serve a static site in site folder
  70. - caddy_data:/data
  71. - caddy_conf:/config
  72. mq:
  73. image: eclipse-mosquitto:2.0.11-openssl
  74. depends_on:
  75. - netmaker
  76. container_name: mq
  77. restart: unless-stopped
  78. ports:
  79. - "8883:8883"
  80. volumes:
  81. - /root/mosquitto.conf:/mosquitto/config/mosquitto.conf
  82. - /root/certs/:/mosquitto/certs/
  83. - mosquitto_data:/mosquitto/data
  84. - mosquitto_logs:/mosquitto/log
  85. volumes:
  86. caddy_data: {}
  87. caddy_conf: {}
  88. sqldata: {}
  89. dnsconfig: {}
  90. mosquitto_data: {}
  91. mosquitto_logs: {}