-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompose.yml
153 lines (149 loc) · 4.99 KB
/
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
x-loki: &loki
logging:
driver: loki # Requires loki docker driver: docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
options:
loki-url: 'http://host.docker.internal:3100/loki/api/v1/push' # <-- MUST be this address and NOT service name, otherwise Docker crashes
x-build: &build
x-bake:
platforms:
- linux/amd64
- linux/arm64
services:
nats-server:
image: docker.io/nats:2.10
ports:
- '4222:4222' # 4222 is for clients.
- '8222:8222' # 8222 is an HTTP management port for information reporting.
- '6222:6222' # 6222 is a routing port for clustering.
volumes:
- './nats-persistence/:/data'
command: '--jetstream --http_port 8222 --store_dir /data'
fullfeedrss:
image: docker.io/heussd/fivefilters-full-text-rss:latest
deploy:
replicas: 2
environment:
# Leave empty to disable admin section
- FTR_ADMIN_PASSWORD=
volumes:
- 'rss-cache:/var/www/html/cache'
loadbalancer:
image: docker.io/nginx
volumes:
- './loadbalancer/nginx.conf:/etc/nginx/nginx.conf'
depends_on:
- fullfeedrss
ports:
- '80:80'
rss-feed-feeder:
image: ghcr.io/heussd/nats-news-analysis/rss-feed-feeder:latest
build:
<<: *build
context: rss-feed-feeder/.
environment:
- NATS_SERVER=http://nats-server:4222
volumes:
- type: bind
source: ./urls.txt
target: /urls.txt
consistency: cached
read_only: true
rss-article-url-feeder-go:
image: ghcr.io/heussd/nats-news-analysis/rss-article-url-feeder-go:latest
deploy:
replicas: 6
build:
<<: *build
context: rss-article-url-feeder-go/.
environment:
- 'NATS_SERVER=nats-server:4222'
restart: always
loki:
container_name: loki
image: grafana/loki:latest
ports:
- '3100:3100'
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./loki/local-config.yaml:/etc/loki/local-config.yaml
keyword-matcher-go:
deploy:
replicas: 8
<<: *loki
image: ghcr.io/heussd/nats-news-analysis/keyword-matcher-go:latest
build:
<<: *build
context: keyword-matcher-go/.
volumes:
- type: bind
source: ./keywords.txt
target: /keywords.txt
consistency: cached
read_only: true
environment:
- 'KEYWORDS_FILE:/keywords.txt'
- 'NATS_SERVER=nats-server:4222'
- 'FULLTEXTRSS_SERVER=http://loadbalancer:80'
pocket-integration:
image: ghcr.io/heussd/nats-news-analysis/pocket-integration:latest
build:
<<: *build
context: pocket-integration/.
cache_from:
- ghcr.io/heussd/nats-news-analysis/pocket-integration:latest
environment:
- 'NATS_SERVER=nats-server:4222'
secrets:
- POCKET_ACCESS_TOKEN
- POCKET_CONSUMER_KEY
raindrop-integration:
image: ghcr.io/heussd/nats-news-analysis/raindrop-integration:latest
build:
<<: *build
context: raindrop-integration/.
cache_from:
- ghcr.io/heussd/nats-news-analysis/raindrop-integration:latest
environment:
- 'NATS_SERVER=nats-server:4222'
env_file:
- .env
grafana:
image: grafana/grafana:master
volumes:
- ./grafana/grafana-datasources.yml:/etc/grafana/provisioning/datasources/datasources.yaml
- ./grafana/dashboard-provider.yaml:/etc/grafana/provisioning/dashboards/main.yaml
- ./grafana/dashboards:/var/lib/grafana/dashboards
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- '3000:3000'
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus/:/etc/prometheus/
- ./prom-storage:/usr/local/share/prometheus
command: --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/usr/local/share/prometheus
natsexporter:
image: natsio/prometheus-nats-exporter
ports:
- '7777:7777'
command:
[
'-varz',
'-subz',
'-serverz',
'-connz',
'-channelz',
'-jsz',
'all',
'http://nats-server:8222',
]
volumes:
rss-cache:
secrets:
POCKET_ACCESS_TOKEN:
file: ./POCKET_ACCESS_TOKEN.txt
POCKET_CONSUMER_KEY:
file: ./POCKET_CONSUMER_KEY.txt