Skip to content

Commit e2b393a

Browse files
author
Anze
committed
Add docker-compose.yml
1 parent dd87bc4 commit e2b393a

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ RUN \
4040
echo "alias l='ls -altr'" >> /root/.bashrc
4141
COPY --from=build-backend /snmpcollector/ /snmpcollector/
4242
WORKDIR /snmpcollector
43-
CMD ["/usr/bin/python", "-m", "snmpcollector"]
43+
CMD ["python", "-m", "snmpcollector"]

docker-compose.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
version: '2.1'
2+
services:
3+
4+
#
5+
# Welcome to Grafolean SNMP Collector!
6+
#
7+
# This file should be modified to suit your running environment. Please check the comments and change
8+
# the settings appropriately.
9+
#
10+
11+
snmpcollector:
12+
# If you wish to load an explicit version, change the next line. For example:
13+
# image: grafolean/grafolean-worker-snmp:v1.0.0
14+
image: grafolean/grafolean-worker-snmp
15+
build:
16+
context: .
17+
dockerfile: Dockerfile
18+
container_name: grafolean-worker-snmp
19+
environment:
20+
# Backend url must be set to the address of the Grafolean backend, for example this uses Grafolean hosted service:
21+
# - BACKEND_URL=https://grafolean.com/api
22+
- BACKEND_URL=${BACKEND_URL}
23+
# To use SNMP Collector, a bot with the protocol "snmp" must be added via user interface, then the token needs to be copied here:
24+
- BOT_TOKEN=${BOT_TOKEN}
25+
# Interval between fetching information about jobs:
26+
- JOBS_REFRESH_INTERVAL=${JOBS_REFRESH_INTERVAL}
27+
restart: always
28+
# Grafolean backend must be accessible on BACKEND_URL *from the point of view of container*. If running
29+
# on the same host, '127.0.0.1' translates to container, not host - this directive changes network mode
30+
# so that Docker networking is bypassed.
31+
#network_mode: "host"

0 commit comments

Comments
 (0)