netmaker/compose/docker-compose.yml

90 lines
2.7 KiB
YAML
Raw Normal View History

2021-05-05 05:36:55 +08:00
version: "3.4"
2021-03-26 00:17:52 +08:00
services:
2021-03-26 00:59:14 +08:00
netmaker:
container_name: netmaker
image: gravitl/netmaker:$SERVER_IMAGE_TAG
env_file: ./netmaker.env
restart: always
2022-07-07 22:54:18 +08:00
volumes:
- dnsconfig:/root/config/dnsconfig
- sqldata:/root/data
2021-05-17 23:55:03 +08:00
environment:
# config-dependant vars
2023-06-14 03:53:24 +08:00
- STUN_LIST=stun1.netmaker.io:3478,stun2.netmaker.io:3478,stun1.l.google.com:19302,stun2.l.google.com:19302
# The domain/host IP indicating the mq broker address
- BROKER_ENDPOINT=wss://broker.${NM_DOMAIN} # For EMQX broker use `BROKER_ENDPOINT=wss://broker.${NM_DOMAIN}/mqtt`
# For EMQX broker (uncomment the two lines below)
#- BROKER_TYPE=emqx
#- EMQX_REST_ENDPOINT=http://mq:18083
# The base domain of netmaker
- SERVER_NAME=${NM_DOMAIN}
- SERVER_API_CONN_STRING=api.${NM_DOMAIN}:443
# Address of the CoreDNS server. Defaults to SERVER_HOST
- COREDNS_ADDR=${SERVER_HOST}
# Overrides SERVER_HOST if set. Useful for making HTTP available via different interfaces/networks.
- SERVER_HTTP_HOST=api.${NM_DOMAIN}
2021-03-26 00:59:14 +08:00
netmaker-ui:
container_name: netmaker-ui
image: gravitl/netmaker-ui:$UI_IMAGE_TAG
env_file: ./netmaker.env
environment:
# config-dependant vars
# URL where UI will send API requests. Change based on SERVER_HOST, SERVER_HTTP_HOST, and API_PORT
BACKEND_URL: "https://api.${NM_DOMAIN}"
2021-03-26 00:17:52 +08:00
depends_on:
2021-03-26 00:59:14 +08:00
- netmaker
2021-05-05 05:36:55 +08:00
links:
- "netmaker:api"
2022-07-07 22:54:18 +08:00
restart: always
2022-11-29 01:16:50 +08:00
caddy:
image: caddy:2.6.2
container_name: caddy
env_file: ./netmaker.env
2022-11-29 01:16:50 +08:00
restart: unless-stopped
2023-04-26 19:44:08 +08:00
extra_hosts:
- "host.docker.internal:host-gateway"
2022-11-29 01:16:50 +08:00
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
2022-11-29 01:16:50 +08:00
- caddy_data:/data
- caddy_conf:/config
2022-11-29 02:03:07 +08:00
ports:
- "80:80"
- "443:443"
2021-05-19 01:55:06 +08:00
coredns:
#network_mode: host
2022-07-07 22:54:18 +08:00
container_name: coredns
2023-08-22 14:18:10 +08:00
image: coredns/coredns:1.10.1
2021-05-19 01:55:06 +08:00
command: -conf /root/dnsconfig/Corefile
env_file: ./netmaker.env
2024-01-23 20:32:15 +08:00
restart: always
2022-07-07 22:54:18 +08:00
depends_on:
- netmaker
2021-05-19 01:55:06 +08:00
volumes:
- dnsconfig:/root/dnsconfig
2022-02-09 11:22:16 +08:00
mq:
2022-07-07 22:54:18 +08:00
container_name: mq
2023-02-22 15:05:39 +08:00
image: eclipse-mosquitto:2.0.15-openssl
env_file: ./netmaker.env
2023-02-22 15:05:39 +08:00
depends_on:
- netmaker
2022-02-09 11:22:16 +08:00
restart: unless-stopped
command: [ "/mosquitto/config/wait.sh" ]
2023-02-22 15:05:39 +08:00
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
- ./wait.sh:/mosquitto/config/wait.sh
2023-02-22 15:05:39 +08:00
- mosquitto_logs:/mosquitto/log
- mosquitto_data:/mosquitto/data
2021-03-26 00:17:52 +08:00
volumes:
caddy_data: { } # runtime data for caddy
caddy_conf: { } # configuration file for Caddy
sqldata: { }
dnsconfig: { } # storage for coredns
mosquitto_logs: { } # storage for mqtt logs
mosquitto_data: { } # storage for mqtt data