docker-compose.caddy.yml 2.1 KB

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