forked from TheThingsNetwork/lorawan-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
137 lines (120 loc) · 4.63 KB
/
docker-compose.yml
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
version: '3.7'
services:
# If using CockroachDB:
cockroach:
image: cockroachdb/cockroach
command: start --http-port 26256 --insecure
restart: unless-stopped
volumes:
- ${DEV_DATA_DIR:-.env/data}/cockroach:/cockroach/cockroach-data
ports:
- "127.0.0.1:26257:26257" # Cockroach
- "127.0.0.1:26256:26256" # WebUI
# If using PostgreSQL:
# postgres:
# image: postgres
# restart: unless-stopped
# environment:
# - POSTGRES_PASSWORD=
# - POSTGRES_USER=root
# - POSTGRES_DB=${DEV_DATABASE_NAME:-ttn_lorawan}
# volumes:
# - ${DEV_DATA_DIR:-.env/data}/postgres:/var/lib/postgresql/data
# ports:
# - "127.0.0.1:5432:5432"
redis:
image: redis
command: redis-server --appendonly yes
restart: unless-stopped
volumes:
- ${DEV_DATA_DIR:-.env/data}/redis:/data
ports:
- "127.0.0.1:6379:6379"
stack:
image: thethingsnetwork/lorawan-stack
entrypoint: ttn-lw-stack
command: start
restart: unless-stopped
depends_on:
- redis
# If using CockroachDB:
- cockroach
# If using PostgreSQL:
# - postgres
# If using (self) signed certificates:
secrets:
- cert.pem
- key.pem
volumes:
- ./blob:/srv/ttn-lorawan/public/blob
# If using Let's Encrypt:
# - ./acme:/var/lib/acme
ports:
# If deploying on a public server:
# - "80:1885"
# - "443:8885"
- "1882:1882"
- "8882:8882"
- "1883:1883"
- "8883:8883"
- "1884:1884"
- "8884:8884"
- "1885:1885"
- "8885:8885"
- "1887:1887"
- "8887:8887"
- "1700:1700/udp"
environment:
# If using CockroachDB:
- TTN_LW_IS_DATABASE_URI=postgres://root@cockroach:26257/${DEV_DATABASE_NAME:-ttn_lorawan}?sslmode=disable
# If using PostgreSQL:
# - TTN_LW_IS_DATABASE_URI=postgres://root@postgres:5432/${DEV_DATABASE_NAME:-ttn_lorawan}?sslmode=disable
- TTN_LW_REDIS_ADDRESS=redis:6379
# Let's Encrypt for "thethings.example.com":
# - TTN_LW_TLS_ACME_ENABLE=true
# - TTN_LW_TLS_ACME_DIR=/var/lib/acme
# - TTN_LW_TLS_ACME_HOSTS=thethings.example.com
# - TTN_LW_TLS_ACME_DEFAULT_HOST=thethings.example.com
# If using (self) signed certificates:
- TTN_LW_TLS_CERTIFICATE=/run/secrets/cert.pem
- TTN_LW_CA=/run/secrets/cert.pem
- TTN_LW_TLS_KEY=/run/secrets/key.pem
# HTTP Server configuration:
- TTN_LW_HTTP_COOKIE_HASH_KEY # generate 64 bytes (openssl rand -hex 64)
- TTN_LW_HTTP_COOKIE_BLOCK_KEY # generate 32 bytes (openssl rand -hex 32)
- TTN_LW_HTTP_METRICS_PASSWORD # choose a password
- TTN_LW_HTTP_PPROF_PASSWORD # choose a password
# Email configuration for "thethings.example.com":
# - TTN_LW_IS_EMAIL_SENDER_NAME=The Things Stack
# - TTN_LW_IS_EMAIL_NETWORK_CONSOLE_URL=https://thethings.example.com/console
# - TTN_LW_IS_EMAIL_NETWORK_IDENTITY_SERVER_URL=https://thethings.example.com/oauth
# If sending email with Sendgrid:
# - TTN_LW_IS_EMAIL_PROVIDER=sendgrid
# - TTN_LW_IS_EMAIL_SENDGRID_API_KEY=enter Sendgrid API key
# If sending email with SMTP:
# - TTN_LW_IS_EMAIL_PROVIDER=smtp
# - TTN_LW_IS_EMAIL_SMTP_ADDRESS=enter mail server address
# - TTN_LW_IS_EMAIL_SMTP_USERNAME=enter username
# - TTN_LW_IS_EMAIL_SMTP_PASSWORD=enter password
# Web UI configuration for "thethings.example.com":
# - TTN_LW_IS_OAUTH_UI_CANONICAL_URL=https://thethings.example.com/oauth
# - TTN_LW_IS_OAUTH_UI_IS_BASE_URL=https://thethings.example.com/api/v3
# - TTN_LW_CONSOLE_OAUTH_AUTHORIZE_URL=https://thethings.example.com/oauth/authorize
# - TTN_LW_CONSOLE_OAUTH_TOKEN_URL=https://thethings.example.com/oauth/token
# - TTN_LW_CONSOLE_UI_CANONICAL_URL=https://thethings.example.com/console
# - TTN_LW_CONSOLE_UI_AS_BASE_URL=https://thethings.example.com/api/v3
# - TTN_LW_CONSOLE_UI_GS_BASE_URL=https://thethings.example.com/api/v3
# - TTN_LW_CONSOLE_UI_IS_BASE_URL=https://thethings.example.com/api/v3
# - TTN_LW_CONSOLE_UI_JS_BASE_URL=https://thethings.example.com/api/v3
# - TTN_LW_CONSOLE_UI_NS_BASE_URL=https://thethings.example.com/api/v3
# Console OAuth client and secret:
- TTN_LW_CONSOLE_OAUTH_CLIENT_ID=console
- TTN_LW_CONSOLE_OAUTH_CLIENT_SECRET=console # generate a good one (openssl rand -hex 32)
# If using (self) signed certificates:
secrets:
cert.pem:
file: ./cert.pem
key.pem:
file: ./key.pem