NA
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
894f7f6648
commit
550d5527c6
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Services
|
||||
title: All Services
|
||||
---
|
||||
|
||||
- **[Cloudlog](https://cloudlog.sa6anw.se)**
|
||||
|
|
|
@ -119,7 +119,7 @@ Skapa en `docker-compose.yaml` med följande innehåll
|
|||
mosquitto_logs: {}
|
||||
|
||||
- Byt till din egen domän
|
||||
- Sätt lång MASTER_KEY och AdminPassword
|
||||
- Sätt lång MASTER_KEY och MQ_ADMIN_PASSWORD
|
||||
|
||||
Du behöver också filen `Caddyfile` i samma folder med följande innehåll
|
||||
|
||||
|
@ -160,7 +160,7 @@ Du behöver också filen `Caddyfile` i samma folder med följande innehåll
|
|||
}
|
||||
- Samma sak här, byt till din domän och mailadress.
|
||||
|
||||
Sista filen du behöver är `wait.sh`
|
||||
Som näst sista filen du behöver är `wait.sh`
|
||||
|
||||
#!/bin/ash
|
||||
|
||||
|
@ -186,10 +186,125 @@ Sista filen du behöver är `wait.sh`
|
|||
|
||||
main "${@}"
|
||||
|
||||
Till sist `mosquitto.conf`
|
||||
|
||||
per_listener_settings false
|
||||
listener 8883
|
||||
protocol websockets
|
||||
allow_anonymous false
|
||||
|
||||
listener 1883
|
||||
protocol websockets
|
||||
allow_anonymous false
|
||||
|
||||
plugin /usr/lib/mosquitto_dynamic_security.so
|
||||
plugin_opt_config_file /mosquitto/data/dynamic-security.json
|
||||
|
||||
|
||||
Sen är det bara att köra `docker-compose up -d`
|
||||
|
||||
**Modifiering**<br>
|
||||
Jag har valt att bryta ut caddy så att jag kan köra fler tjänster med bara en publik IP.
|
||||
|
||||
Det kommer mera!!!
|
||||
Modifiera `docker-compose.yaml` på följande sätt
|
||||
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
netmaker:
|
||||
container_name: netmaker
|
||||
image: gravitl/netmaker:v0.17.0
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- NET_RAW
|
||||
- SYS_MODULE
|
||||
sysctls:
|
||||
- net.ipv4.ip_forward=1
|
||||
- net.ipv4.conf.all.src_valid_mark=1
|
||||
- net.ipv6.conf.all.disable_ipv6=0
|
||||
- net.ipv6.conf.all.forwarding=1
|
||||
restart: always
|
||||
volumes:
|
||||
- dnsconfig:/root/config/dnsconfig
|
||||
- sqldata:/root/data
|
||||
- mosquitto_data:/etc/netmaker
|
||||
environment:
|
||||
SERVER_NAME: "broker.netmaker.sa6anw.se"
|
||||
SERVER_HOST: "81.170.219.67"
|
||||
SERVER_API_CONN_STRING: "api.netmaker.sa6anw.se:443"
|
||||
COREDNS_ADDR: "81.170.219.67"
|
||||
DNS_MODE: "on"
|
||||
SERVER_HTTP_HOST: "api.netmaker.sa6anw.se"
|
||||
API_PORT: "8081"
|
||||
CLIENT_MODE: "on"
|
||||
MASTER_KEY: "MasterKey"
|
||||
CORS_ALLOWED_ORIGIN: "*"
|
||||
DISPLAY_KEYS: "on"
|
||||
DATABASE: "sqlite"
|
||||
NODE_ID: "netmaker-server-1"
|
||||
MQ_HOST: "mq"
|
||||
MQ_PORT: "443"
|
||||
MQ_SERVER_PORT: "1883"
|
||||
HOST_NETWORK: "off"
|
||||
VERBOSITY: "1"
|
||||
MANAGE_IPTABLES: "on"
|
||||
PORT_FORWARD_SERVICES: "dns"
|
||||
MQ_ADMIN_PASSWORD: "AdminPassword"
|
||||
ports:
|
||||
- "51821-51830:51821-51830/udp"
|
||||
+ - "8081:8081"
|
||||
netmaker-ui:
|
||||
container_name: netmaker-ui
|
||||
image: gravitl/netmaker-ui:v0.17.0
|
||||
depends_on:
|
||||
- netmaker
|
||||
links:
|
||||
- "netmaker:api"
|
||||
restart: always
|
||||
environment:
|
||||
BACKEND_URL: "https://api.netmaker.sa6anw.se"
|
||||
+ ports:
|
||||
+ - "8080:80"
|
||||
- caddy:
|
||||
- image: caddy:2.6.2
|
||||
- container_name: caddy
|
||||
- restart: unless-stopped
|
||||
- volumes:
|
||||
- - ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- - caddy_data:/data
|
||||
- - caddy_conf:/config
|
||||
- ports:
|
||||
- - "80:80"
|
||||
- - "443:443"
|
||||
coredns:
|
||||
container_name: coredns
|
||||
image: coredns/coredns
|
||||
command: -conf /root/dnsconfig/Corefile
|
||||
depends_on:
|
||||
- netmaker
|
||||
restart: always
|
||||
volumes:
|
||||
- dnsconfig:/root/dnsconfig
|
||||
mq:
|
||||
container_name: mq
|
||||
image: eclipse-mosquitto:2.0.15-openssl
|
||||
depends_on:
|
||||
- netmaker
|
||||
restart: unless-stopped
|
||||
command: ["/mosquitto/config/wait.sh"]
|
||||
environment:
|
||||
NETMAKER_SERVER_HOST: "https://api.netmaker.sa6anw.se"
|
||||
volumes:
|
||||
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
|
||||
- ./wait.sh:/mosquitto/config/wait.sh
|
||||
- mosquitto_data:/mosquitto/data
|
||||
- mosquitto_logs:/mosquitto/log
|
||||
+ ports:
|
||||
+ - "8883:8883"
|
||||
volumes:
|
||||
caddy_data: {}
|
||||
caddy_conf: {}
|
||||
sqldata: {}
|
||||
dnsconfig: {}
|
||||
|
||||
Filen `Caddyfile` kan du ta bort
|
||||
|
|
Loading…
Reference in New Issue