diff --git a/IMPLEMENTATION.md b/IMPLEMENTATION.md index ff3e896..044a4f9 100644 --- a/IMPLEMENTATION.md +++ b/IMPLEMENTATION.md @@ -224,7 +224,7 @@ Each type lives in `src/FrameProcessor/Domain/`. Tests in `tests/FrameProcessor. - Expose 8080; create `/data/images`. - Non-root user. -### [ ] 10.2 `docker-compose.yml` +### [x] 10.2 `docker-compose.yml` - `frame-processor` service (build from Dockerfile, mount `frames.json` and `/data/images`). - `mosquitto` broker with anonymous access on the local network. - Single network so the service can reach `mosquitto:1883`. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1d23be6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,29 @@ +services: + frame-processor: + build: + context: . + dockerfile: Dockerfile + ports: + - "8080:8080" + volumes: + - ./frames.json:/app/frames.json:ro + - frame-images:/data/images + depends_on: + - mosquitto + networks: + - frame-net + + mosquitto: + image: eclipse-mosquitto:2 + ports: + - "1883:1883" + volumes: + - ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro + networks: + - frame-net + +volumes: + frame-images: + +networks: + frame-net: diff --git a/mosquitto/mosquitto.conf b/mosquitto/mosquitto.conf new file mode 100644 index 0000000..0e3b61e --- /dev/null +++ b/mosquitto/mosquitto.conf @@ -0,0 +1,3 @@ +listener 1883 +allow_anonymous true +persistence false