Tag: node.js

How would the host share a workspace with docker container in the development workflow?

I know that I can mount a folder from the host machine to the container. However, if I develop on Mac, the application may require a different dependecy to run in the container. What is the recommended practice to share this folder across host and container. Example: We have a nodejs project: workspace |\-node_modoule |\-app […]

NodeJS & Docker: How to change the default Context an App is under: e.g. /myapp/stuff rather than /stuff

I have a NodeJS Express application which currently serves an application at the root of the server when node runs. e.g. The main launch page of the app is currently at: / And script resources are served based on the root: /scripts/mystuff.js We’re deploying this using a simple Docker Script utilizing: docker build -t “myapp-0.1.1” […]

Nodemon doesn't restart

I have a nodemon running in a docker-container with a mounted volume on OSX. Nodemon is receiving the file-change but it doesn’t restart the server. Output: Creating piclet_web_1… Attaching to piclet_web_1 web_1 | 7 Sep 13:37:19 – [nodemon] v1.4.1 web_1 | 7 Sep 13:37:19 – [nodemon] to restart at any time, enter `rs` web_1 | […]

Node.js app suddenly fails on local Docker

I have a very simple node.js app cloned from this and the only addition is that it’s connecting to an RDS instance. It runs fine locally (OSX with boot2docker), and runs for a few minutes when I place it in a Docker container, and then all of a sudden, the page no longer renders and […]

Debug a NodeJS application inside Docker

I’m moving my NodeJS application to docker, and the last problem that I have encountered is debugging the application. My setup: OSx, boot2docker, docker (based on centos), WebStorm as IDE and debugger. Here’s what I have by now: Forward 5858 from docker to boot2docker: docker run -p 5858:5858 … Forward 5858 port from boot2docker to […]

Post request with form data raising 400 error in mocha test

I am trying to run test cases within the server using docker containers. While I am trying to test a post request with the image field along with the other field raising bad request 400 all the time. The service seems like working fine for other requests. I am posting the snippet of code here. […]

Ajax not responding on Node.Js Express server

I’m using Express and running with Supervisor on a Docker container. When making Ajax requests to the server it gets no response. I can navigate to the URLs Ajax is using and it responds. The rest of the application/site functions normally. However, when connecting and running the application manually, without using Supervisor, the Ajax requests […]

Amazon EC2 boot time

Our web app performs a random number of tasks for a user initiated action. We have built a small system where a master server calculates the number of worker servers that are needed to complete the task, and the same number of EC2 instances are “Turned On” which pick up the tasks and perform the […]

Nginx & Node inside the same Docker container

I know that this is against the accepted convention but I need to run Nginx alongside a node.js server inside the same Docker container. I have no issues spinning up the container and getting Nginx and Node working alongside. Nginx works on Port 443 which is exposed by the container. The Node server listens on […]

Issue running Gulp on Docker

I have the following Dockerfile FROM debian:jessie MAINTAINER Ewan Valentine <ewan@theladbible.com> WORKDIR /tmp RUN apt-get update -y && \ apt-get install -y \ curl RUN curl –silent –location https://deb.nodesource.com/setup_0.12 | bash – RUN apt-get install –yes nodejs VOLUME [“/var/www/admin/src”] RUN mkdir -p /var/www/admin/src WORKDIR /var/www/admin/src RUN npm install -g gulp ENTRYPOINT [“gulp”] However, when I […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.