- Create docker image for Node App (use this as reference for Dockerfile)
- Push the Node App image to Docker Hub
- Ensure that fleetctl is running and working from your local shell command
- Create new Node service template file (use this as reference for node@.service)
- Create docker image for Nginx load balancer (follow this tutorial to create nginx load balancer)
- Push the Nginx image to Docker Hub
- Create new Nginx service template file [(use this as reference for nginx_lb@.service)](https://gist.github.com/mssio/1b949d0952aa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over the lazy dog | |
short string | |
short string | |
short string | |
short string | |
short string | |
short string | |
short string |
#Nginx Load Balancer Service For Core OS
Create a directory to manage using fleetctl for this service:
$ mkdir static
Create this file in static/nginx_lb.service
#Multiple Node Service Template for Core OS
Create 2 directory to manage using fleetctl for this service:
$ mkdir {templates,instances}
Create this file in templates/node@.service
#Dockerfile for Node App
Here is sample dockerfile for a basic express app
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -qy curl
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -