fix: Fixes sensor service test that was flaky and moves docker stuff into it's own directory.
Some checks failed
CI / Run Tests (push) Failing after 12s

This commit is contained in:
2024-11-14 21:34:48 -05:00
parent d4b6f6ad2b
commit 89f3601c2c
7 changed files with 88 additions and 5 deletions

37
docker/docker-compose.yaml Executable file
View File

@@ -0,0 +1,37 @@
# run this with docker-compose run test
services:
server:
image: swift-mqtt-dewpoint:latest
restart: unless-stopped
env_file: .env
local:
container_name: local-server
build:
context: .
dockerfile: 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