Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeakes committed May 31, 2024
1 parent f394304 commit bbb5ff3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
Binary file removed a.out
Binary file not shown.
16 changes: 10 additions & 6 deletions docker/Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ FROM debian:bookworm AS aqualinkd-build
#VOLUME ["/aqualinkd-build"]

RUN apt-get update && \
apt-get -y install build-essential libsystemd-dev
apt-get -y install curl make gcc libsystemd-dev

# Seup working dir
RUN mkdir /home/AqualinkD
WORKDIR /home/AqualinkD

ARG AQUALINKD_VERSION
RUN curl -sL "https://github.com/sfeakes/AqualinkD/archive/refs/tags/$AQUALINKD_VERSION.tar.gz" | tar xz --strip-components=1
# Get latest release
RUN curl -sL $(curl -s https://api.github.com/repos/sfeakes/AqualinkD/releases/latest | grep "tarball_url" | cut -d'"' -f4) | tar xz --strip-components=1
#RUN curl -sL $(curl -s https://api.github.com/repos/sfeakes/AqualinkD/releases/latest | grep "tarball_url" | cut -d'"' -f4) | tar xz --strip-components=1

# Build aqualinkd
RUN make clean && \
Expand All @@ -30,10 +32,10 @@ RUN make clean && \

FROM debian:bookworm-slim AS aqualinkd

#ARG AQUALINKD_VERSION
ARG AQUALINKD_VERSION

RUN apt-get update && \
apt-get install -y cron curl && \
apt-get install -y cron curl socat && \
apt-get clean

# Set cron to read local.d
Expand All @@ -46,14 +48,16 @@ LABEL org.opencontainers.image.title="AqualinkD"
LABEL org.opencontainers.image.url="https://hub.docker.com/repository/docker/sfeakes/aqualinkd/general"
LABEL org.opencontainers.image.source="https://github.com/sfeakes/AqualinkD"
LABEL org.opencontainers.image.documentation="https://github.com/sfeakes/AqualinkD"
#LABEL org.opencontainers.image.version=$AQUALINKD_VERSION
LABEL org.opencontainers.image.version=$AQUALINKD_VERSION


COPY --from=aqualinkd-build /home/AqualinkD/release/aqualinkd /usr/local/bin/aqualinkd
COPY --from=aqualinkd-build /home/AqualinkD/release/serial_logger /usr/local/bin/serial_logger
COPY --from=aqualinkd-build /home/AqualinkD/web/ /var/www/aqualinkd/
COPY --from=aqualinkd-build /home/AqualinkD/release/aqualinkd.conf /etc/aqualinkd.conf

#COPY --from=aqualinkd-build /home/AqualinkD/docker/aqualinkd-docker.cmd /usr/local/bin/aqualinkd-docker
RUN curl -s -o /usr/local/bin/aqualinkd-docker https://raw.githubusercontent.com/sfeakes/AqualinkD/master/extras/aqualinkd-docker.cmd
RUN curl -s -o /usr/local/bin/aqualinkd-docker https://raw.githubusercontent.com/sfeakes/AqualinkD/master/docker/aqualinkd-docker.cmd && \
chmod +x /usr/local/bin/aqualinkd-docker

CMD ["sh", "-c", "/usr/local/bin/aqualinkd-docker"]
15 changes: 15 additions & 0 deletions docker/aqexec-pre.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Example file that will start SOCAT before AqualinkD in a docker
# to support EW-11 WIFI module for RS485 connection
#
# This file should be placed in the config aqualinkd directory defined
# in your docker-compose.yml (or equiv)
#
# MAKE SURE TO CHAGE THE IP BELOW
#

echo "Starting SOCAT port binding....."
socat -d -d pty,link=/dev/tty.Pool2,raw TCP:192.168.99.248:8899 &
echo "Sleeping for SOCAT start....."
sleep 2s
7 changes: 6 additions & 1 deletion docker/docker-compose.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ services:
aqualinkd:
#image: sfeakes/aqualinkd:latest
build:
context: https://github.com/sfeakes/AqualinkD.git#main:docker
context: https://github.com/sfeakes/AqualinkD.git#master:docker
args:
AQUALINKD_VERSION: v2.3.6 # Make sure to change to correct version
tags:
- aqualinkd:v2.3.6
container_name: aqualinkd
ports:
- "6171:80"
volumes:
Expand Down

0 comments on commit bbb5ff3

Please sign in to comment.