This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from trizz/develop
Release v1.0.0
- Loading branch information
Showing
8 changed files
with
95 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/.idea | ||
/log_mount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Changelog | ||
|
||
### Unreleased / develop | ||
|
||
### v1.0.0 - 2019-10-09 | ||
- Replace console output with a (rotating) log handler. | ||
- Move to `python:3-alpine` base image for greater compatibility with different platforms. | ||
- Extract the dependencies to `requirements.txt`. | ||
- Using `buildx` to create images for the following platforms: | ||
- `linux/amd64` | ||
- `linux/arm64` | ||
- `linux/386` | ||
- `linux/arm/v7` | ||
- `linux/arm/v6` | ||
|
||
### v0.1.0 | ||
- Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
FROM resin/raspberry-pi-alpine-python:3.7-slim | ||
FROM python:3-alpine | ||
|
||
COPY dsmr_datalogger_api_client.py ./ | ||
COPY requirements.txt ./ | ||
|
||
RUN pip install --no-cache-dir pyserial==3.2.1 requests==2.12.4 | ||
RUN mkdir -p /etc/dsmr_logs | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
CMD ["python", "./dsmr_datalogger_api_client.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
read -p 'Tag name (default: develop): ' tagname | ||
tagname=${tagname:-develop} | ||
|
||
# Setup buildx: | ||
# docker buildx create --name dsmrbuilder | ||
# docker buildx use dsmrbuilder | ||
# docker buildx inspect --bootstrap | ||
|
||
docker buildx build --platform linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 -t trizz/dsmr-remote-datalogger:${tagname} --push . && \ | ||
docker buildx imagetools inspect docker.io/trizz/dsmr-remote-datalogger:${tagname} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
# DO NOT USE THIS FILE TO RUN THE DATA LOGGER! | ||
|
||
docker build . -t trizz/dsmr-remote-datalogger:develop && \ | ||
docker run -d \ | ||
-e DSMR_USB_PORT=/dev/ttyUSB0 \ | ||
-e DSMR_API_URL=https://127.0.0.1/api/v1/datalogger/dsmrreading \ | ||
-e DSMR_API_KEY=fake_key \ | ||
-e LOG_LEVEL=debug \ | ||
-v $(pwd)/log_mount:/etc/dsmr_logs \ | ||
trizz/dsmr-remote-datalogger:develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
serial | ||
pyserial==3.2.1 | ||
requests==2.12.4 |