-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcompose.yml
More file actions
142 lines (132 loc) · 3.56 KB
/
compose.yml
File metadata and controls
142 lines (132 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: "netbird"
x-lockdown: &lockdown
# prevents write access to the image itself
read_only: true
# prevents any process within the container to gain more privileges
security_opt:
- "no-new-privileges=true"
x-image-netbird: &image
image: "11notes/netbird:0.66.4"
<<: *lockdown
services:
postgres:
# for more information about this image checkout:
# https://github.com/11notes/docker-postgres
image: "11notes/postgres:18"
<<: *lockdown
environment:
TZ: "Europe/Zurich"
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_BACKUP_SCHEDULE: "0 3 * * *"
volumes:
- "postgres.etc:/postgres/etc"
- "postgres.var:/postgres/var"
- "postgres.backup:/postgres/backup"
tmpfs:
- "/postgres/run:uid=1000,gid=1000"
- "/postgres/log:uid=1000,gid=1000"
networks:
backend:
restart: "always"
dashboard:
<<: *image
environment:
NETBIRD_MGMT_API_ENDPOINT: "https://${NETBIRD_FQDN}"
NETBIRD_MGMT_GRPC_API_ENDPOINT: "https://${NETBIRD_FQDN}"
AUTH_AUDIENCE: "netbird-client"
AUTH_CLIENT_ID: "netbird-client"
AUTH_CLIENT_SECRET:
AUTH_AUTHORITY: "https://${KEYCLOAK_FQDN}/realms/${KEYCLOAK_REALM}"
USE_AUTH0: false
AUTH_SUPPORTED_SCOPES: "openid"
NETBIRD_TOKEN_SOURCE: "accessToken"
entrypoint: ["/usr/local/bin/dashboard"]
volumes:
- "dashboard.var:/nginx/var"
tmpfs:
- "/nginx/cache:uid=1000,gid=1000"
- "/nginx/run:uid=1000,gid=1000"
networks:
frontend:
ports:
- "3000:3000/tcp"
healthcheck:
test: ["CMD", "/usr/local/bin/localhealth", "http://127.0.0.1:3000/ping", "-I"]
interval: 5s
timeout: 2s
start_period: 5s
restart: "always"
management:
depends_on:
postgres:
condition: "service_healthy"
restart: true
<<: *image
env_file: '.env'
environment:
TZ: "Europe/Zurich"
NETBIRD_STORE_ENGINE_POSTGRES_DSN: "host=postgres user=postgres password=${POSTGRES_PASSWORD} dbname=postgres port=5432"
NB_ACTIVITY_EVENT_STORE_ENGINE: "postgres"
NB_ACTIVITY_EVENT_POSTGRES_DSN: "host=postgres user=postgres password=${POSTGRES_PASSWORD} dbname=postgres port=5432"
entrypoint: ["/usr/local/bin/management"]
volumes:
- "management.etc:/netbird/etc"
- "management.var:/netbird/var"
tmpfs:
- "/tmp:uid=1000,gid=1000"
networks:
frontend:
backend:
ports:
- "3080:80/tcp"
- "33073:33073/tcp"
sysctls:
net.ipv4.ip_unprivileged_port_start: 80
healthcheck:
test: ["CMD", "/usr/local/bin/localhealth", "http://127.0.0.1:9090/metrics", "-I"]
interval: 5s
timeout: 2s
start_period: 5s
restart: "always"
signal:
<<: *image
environment:
TZ: "Europe/Zurich"
entrypoint: ["/usr/local/bin/signal"]
command: [
"run",
"--log-file", "console",
"--log-level", "info"
]
volumes:
- "signal.var:/netbird/var"
networks:
frontend:
ports:
- "10000:10000/tcp"
restart: "always"
relay:
<<: *image
environment:
TZ: "Europe/Zurich"
NB_LISTEN_ADDRESS: ":33080"
NB_EXPOSED_ADDRESS: "rels://${NETBIRD_FQDN}:443"
NB_AUTH_SECRET: ${NETBIRD_RELAY_SECRET}
entrypoint: ["/usr/local/bin/relay"]
networks:
frontend:
ports:
- "33080:33080/tcp"
restart: "always"
volumes:
management.etc:
management.var:
dashboard.var:
signal.var:
postgres.etc:
postgres.var:
postgres.backup:
networks:
frontend:
backend:
internal: true