Skip to content
Snippets Groups Projects
Unverified Commit 8c735c1f authored by PICHOU Kyâne's avatar PICHOU Kyâne
Browse files

Remove Dockerfile from this repository

parent a2a4b430
No related branches found
No related tags found
No related merge requests found
##### Project related files #####
config/config.json
Dockerfile
README.md
.git/
##### Python related files #####
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# pyenv
.python-version
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
FROM python:3.7-alpine
MAINTAINER kyane@kyane.fr
# Copy all code
COPY . /code
WORKDIR /code
# Install dependencies
RUN pip3 install -r requirements.txt
VOLUME /code/config/config.json
ENTRYPOINT ["/code/entrypoint.sh"]
......@@ -19,12 +19,6 @@ Configuration for InfluxDB is under the `influxdb` key. It is a simple object wi
- `password` : Password for the user
- `database` : Database to use
### Docker
A simple Docker image is provided in order to run this bot on a regular basis. It is a simple Python 3 (Alpine based) Docker image with all the requirements. The entrypoint is quite simple : a while loop that call the `main.py` script and sleep for some times. The interval to sleep between each calls can be configured with the environment variable `INTERVAL_SECONDS` (default to `60`).
Also, don't forget to mount your configuration file on `/code/config/config.json`
## Modules
This bot is modular : each module provide an interface allow to collect metrics for a service. The main function use those modules and push all data to InfluxDB.
......
#!/bin/sh
INTERVAL_SECONDS=${INTERVAL_SECONDS:-60}
while :
do
python3 main.py
sleep $INTERVAL_SECONDS
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment