docker-compose.caddy.yml 1.9 KB

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