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 # Build the executable
FROM swift:5.10 AS build FROM swift:5.10 AS build
WORKDIR /build WORKDIR /build

View File

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

View File

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

View File

@@ -2,7 +2,7 @@
services: services:
test: test:
build: build:
context: . context: ..
dockerfile: docker/Dockerfile.test dockerfile: docker/Dockerfile.test
working_dir: /app working_dir: /app
depends_on: depends_on:
@@ -13,10 +13,5 @@ services:
mosquitto: mosquitto:
build: build:
context: . context: ..
dockerfile: docker/Dockerfile.mosquitto 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: services:
server: dewpoint_controller:
image: swift-mqtt-dewpoint:latest container_name: dewpoint-controller
restart: unless-stopped
env_file: .env
local:
container_name: local-server
build: build:
context: . context: ..
dockerfile: Dockerfile dockerfile: docker/Dockerfile
depends_on: depends_on:
- mosquitto - mosquitto
environment: environment:
- MQTT_HOST=mosquitto - 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: mosquitto:
build: build:
context: . context: ..
dockerfile: Dockerfile.mosquitto dockerfile: docker/Dockerfile.mosquitto
ports:
networks: - "1883:1883"
test:
driver: bridge
external: false