Tag: node.js

buddy-http-api response Unauthorized

Hello Stackoverflower, I’m setting up buddy-http-api using docker. After docker container launch is done, I ssh to docker container for testing API. I run: curl http://localhost:9123/api/account -X POST -H “Content-Type: application/json” \ -H “Accept: application/json” \ -d “{ \ \”username\”: \”user2@ab.com\”, \ \”password\”: \”12345678\”, \ \”email\”: \”thanh.nguyen2891@gmail.com\”\ }” I got: Unauthorized I’m not sure how […]

portforwarding a node/postgres application in docker

I’m getting started with docker and I am trying to run a node/postgres application. When I run the app using docker-compose up I get the following output: Starting nodedocker_db_1 Starting nodedocker_myapp_1 Attaching to nodedocker_db_1, nodedocker_myapp_1 db_1 | LOG: database system was shut down at 2016-08-03 08:33:02 UTC db_1 | LOG: MultiXact member wraparound protections are […]

Winston Not Logging

I have winston on my node js app with express running. I have it setup to log to a port which has a log app listening on it. I am running my app and the only way the logs appear on the other port is when i shut down my app and it seems as […]

process.env.VARIABLE is undefined in webpack/docker/heroku deployment

I am having some issues getting my app to read the heroku environment variables. The application itself is a node.js react/redux web application ran with webpack-dev-server, deployed in a Docker container which is hosted on Heroku. I’m setting the variables in a config.js file, which are to be used through the app: module.exports = { […]

Docker compose volume mapping with NodeJS app

I am trying to achieve something incredibly basic, but have been going at this for a couple of evenings now and still haven’t found a solid (or any) solution. I have found some similar topics on SO and followed what was on there but to no avail, so I have created a GitHub repo for […]

Error: unsupported type in amqp table: undefined

I have the following docker-compose file: services: application: environment: AMQP_HOST: rabbitmq-service AMQP_USER: root AMQP_PASSWORD: parola rabbitmq-service: container_name: rabbitmq-service image: rabbitmq:3.6-management ports: – “15672:15672” – “5672:5672” environment: RABBITMQ_DEFAULT_PASS: parola RABBITMQ_DEFAULT_USER: root RABBITMQ_HIPE_COMPILE: 1 And the following connection code to rabbitmq: (coffeescript): connection = amqp.createConnection( { host: “#{process.env.AMQP_HOST}” login: “#{process.env.AMQP_USER}” password: “#{process.env.AMQP_PASSWORD}” vhost: “#{process.env.AMQP_VHOST || ‘/’}” port: […]

Docker Nginx with Angular JS – Load Static CSS, Images, JS with dynamic url

We are moving our legacy deployment to Docker Containers. All services will be running in seperate docker containers. Services includes Postgres, Redis, JobProcessor, LogProcessor, Nginx with Consul template, Consul, Registrator, Rabbitmq and the Platform(Node JS). We have splitted these services as Master and Platform. Master services includes all the above mentioned services except the platform. […]

In docker node_modules directory becomes unreachable

My issue is that my node_modules directory seems to lose modules and causes nodemon to crash saying it can’t find a file. On restart of the container it fixes it. I have a Dockerfile where I install npm packages and I call this from a docker-compose file. The docker-compose describes a volume directory where I […]

change db:5432 to 127.0.0.1:5432 in docker-compose file

In my docker-compose.yml file i have two images. I am linking db to my myapp container with node.js application and everything works as long as my sequelize database host is db. var sequelize = new Sequelize(DATABASE, USERNAME, PASSWORD, { “host”: “db”, “port”: 5432, “dialect”: “postgres” }); Is it possible to configure docker-compose.yml so I can […]

Can not exit from node app, when using docker

CRT + C is not stopping the node app, when I run the app using docker. Following are the steps I have done. I would be very thankful for your help. My node app. var config = require(‘./config.json’); var mongodb = require(‘mongodb’); var request = require(‘request’); var http = require(‘http’); // Debug log entry when […]

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