Git Product home page Git Product logo

Comments (2)

SeanRiggs avatar SeanRiggs commented on August 20, 2024 1

from pi-weather-station.

eiddor avatar eiddor commented on August 20, 2024

FWIW - I decided to try to build my own Docker image for the project until Sean gets a chance to update his image (if he decides to do so.)

It seems to work fine as long as the /server/index.js workaround described on the repo is done. It's fairly basic and I'm sure doesn't follow any Docker best practices, but it works.

FROM node:18-alpine
RUN mkdir /home/node/app
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/app
COPY --chown=node:node pi-weather-station/package*.json ./
USER node
RUN npm install
COPY --chown=node:node pi-weather-station/. .
EXPOSE 8080
CMD [ "npm", "start" ]
  1. Put the above commands in a file names Dockerfile in a build directory.
  2. git clone https://github.com/elewin/pi-weather-station.git in that directory
  3. Apply the server/index.js workaround mentioned above.
  4. Run: docker build -t weather-station:0.0.1 . in the build directory.
  5. Run the container using your preferred method:

CLI

docker run -itd --name weather-station -p 8080:8080 -v -v appdata:/app weather-station:0.0.1

Docker Compose (my preferred method)

version: '3'
services:
  weather-station:
    image: weather-station:0.0.1
    container_name: weather-station
    ports:
      - "8080:8080"
    volumes:
      - appdata:/app
    restart: unless-stopped
volumes:
  appdata:

Feel free to ping me if you have any questions (or spot any issues).

from pi-weather-station.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.