netmaker/compose/docker-compose.reference.yml

67 lines
4.5 KiB
YAML
Raw Normal View History

2021-05-17 23:55:03 +08:00
services:
2021-08-11 11:27:13 +08:00
rqlite:
container_name: rqlite
image: rqlite/rqlite
network_mode: host
2021-05-17 23:55:03 +08:00
restart: always
2021-08-11 11:27:13 +08:00
volumes:
- sqldata:/rqlite/file/data
2021-05-19 01:55:06 +08:00
netmaker: # The Primary Server for running Netmaker
privileged: true # Necessary to run sudo/root level commands on host system. Take out if not running with CLIENT_MODE=on
2021-05-17 23:55:03 +08:00
container_name: netmaker
depends_on:
2021-08-11 11:27:13 +08:00
- rqlite
2022-01-16 23:16:00 +08:00
image: gravitl/netmaker:v0.9.4
volumes: # Volume mounts necessary for CLIENT_MODE to control wireguard networking on host (except dnsconfig, which is where dns config files are stored for use by CoreDNS)
2021-05-19 01:55:06 +08:00
- dnsconfig:/root/config/dnsconfig # Netmaker writes Corefile to this location, which gets mounted by CoreDNS for DNS configuration.
2021-05-17 23:55:03 +08:00
- /usr/bin/wg:/usr/bin/wg
2021-05-19 01:55:06 +08:00
cap_add: # Necessary for CLIENT_MODE. Should be removed if turned off.
2021-05-17 23:55:03 +08:00
- NET_ADMIN
restart: always
2021-05-19 01:55:06 +08:00
network_mode: host # Necessary for CLIENT_MODE. Should be removed if turned off, but then need to add port mappings
environment:
SERVER_HOST: "" # All the Docker Compose files pre-populate this with HOST_IP, which you replace as part of the install instructions. This will set both HTTP and GRPC host.
SERVER_HTTP_HOST: "127.0.0.1" # Overrides SERVER_HOST if set. Useful for making HTTP and GRPC available via different interfaces/networks.
SERVER_GRPC_HOST: "127.0.0.1" # Overrides SERVER_HOST if set. Useful for making HTTP and GRPC available via different interfaces/networks.
API_PORT: 8081 # The HTTP API port for Netmaker. Used for API calls / communication from front end. If changed, need to change port of BACKEND_URL for netmaker-ui.
GRPC_PORT: 50051 # The GRPC port for Netmaker. Used for communications from nodes.
CLIENT_MODE: "on" # on if netmaker should run its own client, off if not.
2021-05-19 01:55:06 +08:00
MASTER_KEY: "secretkey" # The admin master key for accessing the API. Change this in any production installation.
CORS_ALLOWED_ORIGIN: "*" # The "allowed origin" for API requests. Change to restrict where API requests can come from.
REST_BACKEND: "on" # Enables the REST backend (API running on API_PORT at SERVER_HTTP_HOST). Change to "off" to turn off.
AGENT_BACKEND: "on" # Enables the AGENT backend (GRPC running on GRPC_PORT at SERVER_GRPC_HOST). Change to "off" to turn off.
DNS_MODE: "on" # Enables DNS Mode, meaning config files will be generated for CoreDNS. Note, turning "off" does not remove CoreDNS. You still need to remove CoreDNS from compose file.
DISABLE_REMOTE_IP_CHECK: "off" # If turned "on", Server will not set Host based on remote IP check. This is already overridden if SERVER_HOST is set. Turned "off" by default.
2021-07-19 07:52:10 +08:00
GRPC_SSL: "off" # Tells clients to use SSL to connect to GRPC. Switch to on to turn on.
2021-08-11 11:27:13 +08:00
COREDNS_ADDR: "" # Address of the CoreDNS server. Defaults to SERVER_HOST
2021-11-17 11:39:28 +08:00
DISPLAY_KEYS: "on" # Show keys permanently in UI (until deleted) as opposed to 1-time display.
2021-07-19 07:52:10 +08:00
SERVER_API_CONN_STRING: "" # Changes the api connection string. IP:PORT format. By default is empty and uses SERVER_HOST:API_PORT
SERVER_GRPC_CONN_STRING: "" # Changes the grpc connection string. IP:PORT format. By default is empty and uses SERVER_HOST:GRPC_PORT
2022-01-18 00:28:28 +08:00
RCE: "off" # Enables setting PostUp and PostDown (arbitrary commands) on nodes from the server. Off by default.
NODE_ID: "" # Sets the name/id of the nodes that the server creates. Necessary for HA configurations to identify between servers (for instance, netmaker-1, netmaker-2, etc). For non-HA deployments, is not necessary.
TELEMETRY: "on" # Whether or not to send telemetry data to help improve Netmaker. Switch to "off" to opt out of sending telemetry.
2021-05-19 01:55:06 +08:00
netmaker-ui: # The Netmaker UI Component
2021-05-17 23:55:03 +08:00
container_name: netmaker-ui
depends_on:
- netmaker
2022-01-07 04:05:38 +08:00
image: gravitl/netmaker-ui:v0.9.3
2021-05-17 23:55:03 +08:00
links:
- "netmaker:api"
ports:
2021-08-11 11:27:13 +08:00
- "8082:80"
2021-05-17 23:55:03 +08:00
environment:
2021-05-19 01:55:06 +08:00
BACKEND_URL: "http://HOST_IP:8081" # URL where UI will send API requests. Change based on SERVER_HOST, SERVER_HTTP_HOST, and API_PORT
coredns: # The DNS Server. Remove this section if DNS_MODE="off"
2021-05-17 23:55:03 +08:00
depends_on:
- netmaker
image: coredns/coredns
2021-05-19 01:55:06 +08:00
command: -conf /root/dnsconfig/Corefile # Config location for Corefile. This is the path of file which is also mounted to Netmaker for modification.
2021-05-17 23:55:03 +08:00
container_name: coredns
restart: always
ports:
2021-05-19 01:55:06 +08:00
- "53:53/udp" # Likely needs to run at port 53 for adequate nameserver usage.
2021-05-17 23:55:03 +08:00
volumes:
- dnsconfig:/root/dnsconfig
volumes:
2021-08-11 11:27:13 +08:00
sqldata: {}
dnsconfig: {}