-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (76 loc) · 2.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (76 loc) · 2.36 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
version: "3.4"
services:
postgres:
# In production, replace 'latest' with tag from https://hub.docker.com/_/postgres?tab=tags
image: postgres:latest
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=root
- POSTGRES_USER=root
- POSTGRES_DB=ttn_lorawan
volumes:
- ./data/ttn/postgres:/var/lib/postgresql/data
#ports:
# - "127.0.0.1:5432:5432"
networks:
- "local"
redis:
# In production, replace 'latest' with tag from https://hub.docker.com/_/redis?tab=tags
image: redis:latest
command: redis-server --appendonly yes
restart: unless-stopped
volumes:
- ./data/ttn/redis:/data
#ports:
# - "127.0.0.1:6379:6379"
networks:
- "local"
stack:
# In production, replace 'latest' with tag from https://hub.docker.com/r/thethingsnetwork/lorawan-stack/tags
image: thethingsnetwork/lorawan-stack:latest
entrypoint: ttn-lw-stack -c /config/ttn-lw-stack-docker.yml
command: start
restart: unless-stopped
depends_on:
- redis
- postgres
volumes:
- ./blob:/srv/ttn-lorawan/public/blob
- ./config/stack:/config:ro
# If using Let's Encrypt:
#- ./acme:/var/lib/acme
environment:
TTN_LW_BLOB_LOCAL_DIRECTORY: /srv/ttn-lorawan/public/blob
TTN_LW_REDIS_ADDRESS: redis:6379
TTN_LW_IS_DATABASE_URI: postgres://root:root@postgres:5432/ttn_lorawan?sslmode=disable
ports:
- 1700:1700/udp
healthcheck:
test: curl --fail http://localhost:8089 || exit 1
interval: 30s
timeout: 10s
retries: 5
expose:
- 8089
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.ttn.rule=Host(`ttn.testvps.acrios.com`)"
- "traefik.http.routers.ttn.EntryPoints=web"
- "traefik.http.routers.ttn.middlewares=redir-https@file"
- "traefik.http.routers.ttn-https.EntryPoints=websecure"
- "traefik.http.routers.ttn-https.rule=Host(`ttn.testvps.acrios.com`)"
- "traefik.http.routers.ttn-https.tls.certresolver=letsencrypt"
- "traefik.http.routers.ttn-https.tls=true"
- "traefik.http.services.ttn-https.loadbalancer.server.port=8089"
networks:
- "local"
- "proxy"
networks:
local:
external: False
ipam:
config:
- subnet: 172.123.255.0/24
proxy:
external: True