With the recent news about Nodejitsu shutting down its PaaS service, we received questions from some Nodejitsu customers asking about support on moving their apps to Cloud 66, so I thought I should offer to help anyone affected to move their apps over to Cloud 66. For those not familiar, we offer powerful end-to-end managed stacks for your apps on your servers on any cloud (eg. DigitalOcean, Linode, AWS), where you have full control of the underlying infrastructure but still enjoy the convenience of managed infrastructure.
Luckily, getting your Node app up and running on Cloud 66 is very straightforward:
- Place a file called
Dockerfilein your code repository, and paste
FROM node:latestat the top. This will use the official Docker Node.js image as the base for your own image.
RUN mkdir -p /usr/src/appto create a folder for your app,
WORKDIR /usr/src/appto set this folder as your working directory, and then copy your app into it with
COPY . /usr/src/app.
EXPOSE <port>to set which port this image will listen on.
RUN npm installto install your required packages, and
CMD ["<command>"]to set the start command.
Your resulting file could look like this:
FROM node:latest RUN mkdir -p /usr/src/app WORKDIR /usr/src/app COPY . /usr/src/app EXPOSE 5000 RUN npm install CMD ["npm", "start"]
Once you've commited this to your Git repository, you're ready to create a stack on Cloud 66. Simply click Build a Docker stack and specify your Git repository and branch. This will use Cloud 66 BuildGrid to create (and version) a Docker image based on your Dockerfile and deploy it to your servers. Once there, we manage your container lifecycle, full networking layer, DNS and more.
Obviously this is a simple app and your Node.js apps are very likely to use databases and other components. We do support MySQL , PostgreSQL , MongoDB and Redis as well as ElasticSearch , MemcacheD and RabbitMQ out of the box and you can add and install your own components on the servers. They are your servers after all!
To know more about load balancing, security, team access management, firewalls, backups and DB replications, please visit our documentation to learn more about Cloud 66 Docker support. If you need any help getting your Node app up and running, email us and we'll be happy to help!