Wanting help making a node.js docker [SOLVED]


Recommended Posts

 

Okay needo... need a bit of help here

 

FROM phusion/baseimage:0.9.11
MAINTAINER smdion <[email protected]>
ENV DEBIAN_FRONTEND noninteractive

# Set correct environment variables
ENV HOME /root

# Use baseimage-docker's init system
CMD ["/sbin/my_init"]

# Fix a Debianism of the nobody's uid being 65534
RUN usermod -u 99 nobody
RUN usermod -g 100 nobody

RUN add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse"
RUN add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse"
RUN apt-get update -q

# Install Dependencies
RUN apt-get install -qy vnstat npm unrar wget

# Install UpStatsBoard v0.2.1
RUN wget -P /tmp/ https://github.com/lienma/UpsBoard/archive/0.2.1.tar.gz
RUN tar -C /opt/ -xvf /tmp/0.2.1.tar.gz
RUN cd /opt/UpsBoard-0.2.1 && npm install
ADD . /opt/UpsBoard-0.2.1
RUN chown nobody:users /opt/UpsBoard-0.2.1

EXPOSE 8024

CMD ["nodejs", "/opt/UpsBoard-0.2.1/app.js"]

 

I need to be able to edit (and other users) config.js which is pulled down from git.  How do I get access to that file from like /mnt/cache/appdata on unRAID?

Link to comment

It looks like there is no way to tell node.js that the config file is in a different directory.  Would the easiest way to do this be to download the UpStatsBoard files directly to the cache drive then mount that location in the docker container?

 

EDIT: found a way from looking at the plexwatch docker. Just needed "RUN ln -s /config/config.js /opt/UpsBoard-0.2.1/config.js"

 

Still a work in process... need to get VNSTAT working with cron.

 

https://registry.hub.docker.com/u/smdion/docker-upstatsboard/

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.