diff --git a/Dockerfile b/Dockerfile index a175957..0865f86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,6 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-l FROM base COPY --from=prod-deps /app/node_modules /app/node_modules COPY ./src ./src -COPY ./config ./config EXPOSE 5000/udp diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml new file mode 100644 index 0000000..11603f8 --- /dev/null +++ b/docker-compose.dev.yml @@ -0,0 +1,23 @@ +version: '3.6' + +services: + + mqtt-broker: + image: eclipse-mosquitto + command: ["mosquitto", "-c", "/mosquitto-no-auth.conf"] + ports: + - "1883:1883" + + flot-server: + build: . + restart: unless-stopped + environment: + LOG_LEVEL: debug + LOG_PRETTY: 1 + MQTT_BROKER_URL: mqtt://mqtt-broker + + ports: + - "5000:5000/udp" + depends_on: + - mqtt-broker + diff --git a/docker-compose.yml b/docker-compose.yml index 0b1975c..8e338e0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,15 +9,16 @@ services: - "1883:1883" flot-server: - build: . + image: hardwario/udpserver-with-cbor-decoder:v1.1.0 restart: unless-stopped environment: LOG_LEVEL: debug LOG_PRETTY: 1 MQTT_BROKER_URL: mqtt://mqtt-broker - + volumes: + - ./config:/app/config ports: - - "5000:5000" + - "5000:5000/udp" depends_on: - mqtt-broker