Initial commit
This commit is contained in:
commit
8410fa3b64
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
FROM golang:alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
RUN apk add --update --no-cache git make
|
||||||
|
|
||||||
|
RUN git clone https://git.blackfinn.de/go/activitycollect.git && \
|
||||||
|
cd activitycollect && \
|
||||||
|
make all
|
||||||
|
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/bin
|
||||||
|
COPY --from=builder /build/activitycollect/bin/activitycollect /usr/bin
|
||||||
|
|
||||||
|
RUN mkdir -p /activitycollect/infolder
|
||||||
|
RUN mkdir -p /activitycollect/outfolder
|
||||||
|
|
||||||
|
COPY config.json /activitycollect/
|
||||||
|
COPY run.sh /usr/bin/
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/bin/run.sh"]
|
||||||
|
|
7
config.json
Normal file
7
config.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"in_folder": "/acticitycollect/infolder",
|
||||||
|
"out_folder": "/activitycollect/outfolder",
|
||||||
|
"influxdb_host": "barsch.local",
|
||||||
|
"influxdb_port": 8086,
|
||||||
|
"influxdb_token": ""
|
||||||
|
}
|
11
run.sh
Executable file
11
run.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ ! -f /etc/activitycollect/config.json ];
|
||||||
|
then
|
||||||
|
echo "config not fount - installing default config file";
|
||||||
|
mkdir -p /etc/activitycollect
|
||||||
|
cp /activitycollect/config.json /etc/activitycollect/config.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
/usr/bin/activitycollect -c /etc/activitycollect/config.json
|
||||||
|
|
12
start.sh
Executable file
12
start.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
-d \
|
||||||
|
--volume "/srv/activitycollect/config:/etc/activitycollect" \
|
||||||
|
--volume "/srv/dropbox/Apps/WahooFitness:/activitycollect/infolder/" \
|
||||||
|
--volume "/srv/activitycollect/data/processed:/activitycollect/outfolder/" \
|
||||||
|
--name activitycollect \
|
||||||
|
--rm \
|
||||||
|
--restart unless-stopped \
|
||||||
|
activitycollect
|
||||||
|
|
Loading…
Reference in New Issue
Block a user