feat: Minimal readme and cleans up docker files.
Some checks failed
CI / Run Tests (push) Failing after 13s

This commit is contained in:
2024-11-14 22:12:20 -05:00
parent 9e2af22a36
commit 5e998a60d0
6 changed files with 21 additions and 38 deletions

View File

@@ -1,3 +1,7 @@
# dewPoint-controller
# dewpoint-controller
A description of this package.
![CI](https://git.housh/dev/actions/workflows/ci.yaml/badge.svg?branch=main)
Listens to an MQTT broker for temperature and humidity sensors and calculates
the dew-point temperature and enthalpy for the sensor, then publishes those back
to the MQTT broker.

View File

@@ -1,4 +1,4 @@
# Used this to build the release version of the image.
# Build the executable
FROM swift:5.10 AS build
WORKDIR /build

View File

@@ -1,3 +1,5 @@
# Used to build a local MQTT broker for development and
# testing.
FROM eclipse-mosquitto:latest
COPY ./mosquitto/config/mosquitto.conf /mosquitto/config/mosquitto.conf
EXPOSE 1883

View File

@@ -1,3 +1,4 @@
# Used to build a test image.
FROM swift:5.10
WORKDIR /app
COPY ./Package.* ./

View File

@@ -2,7 +2,7 @@
services:
test:
build:
context: .
context: ..
dockerfile: docker/Dockerfile.test
working_dir: /app
depends_on:
@@ -13,10 +13,5 @@ services:
mosquitto:
build:
context: .
context: ..
dockerfile: docker/Dockerfile.mosquitto
networks:
test:
driver: bridge
external: false

View File

@@ -1,37 +1,18 @@
# run this with docker-compose run test
# run this with docker-compose run dewpoint_controller
services:
server:
image: swift-mqtt-dewpoint:latest
restart: unless-stopped
env_file: .env
local:
container_name: local-server
dewpoint_controller:
container_name: dewpoint-controller
build:
context: .
dockerfile: Dockerfile
context: ..
dockerfile: docker/Dockerfile
depends_on:
- mosquitto
environment:
- MQTT_HOST=mosquitto
test:
build:
context: .
dockerfile: Dockerfile.test
working_dir: /app
depends_on:
- mosquitto
environment:
- MOSQUITTO_SERVER=mosquitto
command: /bin/bash -xc "swift test"
mosquitto:
build:
context: .
dockerfile: Dockerfile.mosquitto
networks:
test:
driver: bridge
external: false
context: ..
dockerfile: docker/Dockerfile.mosquitto
ports:
- "1883:1883"