jtblin / syncho

Fast and lean abstraction for node Fibers. Easily run asynchronous functions synchronously.
Other
21 stars 4 forks source link

Can't find module when running node.js on 0.8 #3

Closed mmeroberts closed 9 years ago

mmeroberts commented 9 years ago

I am trying to get the synchro running in a docker container running 0.8 build, but it finds other modules but seems to have issues when trying to require synchro.

jtblin commented 9 years ago

I use syncho in projects that are packaged with Docker without any problem. Not sure what your issue is exactly, perhaps you could include a stacktrace and more details.

jtblin commented 9 years ago

Example Dockerfile, /opt/service is where application code is deployed in this example.

FROM ubuntu:14.04

# RUN instructions are separated to leverage RUN cache
RUN \
    apt-get update && \
    apt-get -y upgrade && \
    apt-get -y install npm

# Adding application contents
ADD . /opt/service/

# Installing node
WORKDIR /opt/service
RUN ["npm", "install", "--production"]

# Setting container execution command
# in Ubuntu/Debian NodeJs is installed as "nodejs" not as "node"
CMD ["nodejs", "index.js"]

EXPOSE 8080