Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get PM2 to talk to keymetrics within a Docker on ElasticBeanstalk #1706

Closed
tanepiper opened this issue Oct 21, 2015 · 1 comment
Closed

Comments

@tanepiper
Copy link

Hi there,

Apologies if this is not the right place but I couldn't see any other support channel for this.

I'm looking to use pm2 with keymetrics for an app we're developing. The app itself is a node app build in hapi, that runs with in a Docker container and deployed to ElasticBeanstalk.

I've tested it locally on my machine and it works, but when I deploy to eb, the server does get picked up - but no apps - and then eventually it goes to show a status of offline (although the status icon at the top next to the arrows shows green, and it shows the correct PM2 and node version).

My config looks like this for the Dockerfile:

FROM node:wheezy

EXPOSE 80 9000 43554

ENV APP_DIR /opt/app

WORKDIR ${APP_DIR}

ADD . $APP_DIR

RUN wget -qO- http://install.keymetrics.io/install.sh | SECRET_ID=... PUBLIC_ID=... bash

RUN npm install -g pm2

RUN pm2 install pm2-server-monit

RUN npm install

RUN npm run build

CMD ["pm2", "start", "index.js", "-i", "0", "--name", "app-docker", "--no-daemon"]

In the EB Dockerrun file I have

{
  "AWSEBDockerrunVersion": "1",
  "Authentication": {...},
  "Image": {...},
  "Ports": [{
    "ContainerPort": "9000"
  }, {
    "ContainerPort": "43554"
  }, {
    "ContainerPort": "80"
  }]
}

And finally in the security group in ElasticBeanstalk I've opened port 43554 as a custom rule to 0.0.0.0/0.

But nothing. When I do a fresh deploy it does show the server #1 tool as online for a short while before it goes offline. The app itself is running fineI'm wondering if anyone has found a solution to this?

@tanepiper
Copy link
Author

Turns out after a few days digging - the image was being build on CircleCI, and was contacting the bucket first, so blocking the bucket from getting a second server (currently this a free tier)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants