Skip to content

Commit

Permalink
WeaveCluster test now works with proper nginx.conf
Browse files Browse the repository at this point in the history
It was the format of the nginx.conf (windows) that should been linux line endings that made nginx fail. Now it all works.
  • Loading branch information
Mario Toffia committed Apr 25, 2016
1 parent eb55eb2 commit be82f0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions Ductus.FluentDockerTest/FluentMultiContainerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public void WeaveCluster()

try
{
// TODO: Currently it does not resolve links and only starts container
// TODO: in order they where added in fluent API - thus bottom up approach
//
using (var services = new Builder()
// Define custom node image to be used
.DefineImage("mariotoffia/nodetest")
Expand All @@ -47,10 +44,9 @@ public void WeaveCluster()
.Run("cd /tmp && npm install")
.Run("mkdir -p /src && cp -a /tmp/node_modules /src/")
.UseWorkDir("/src")
.Add("embedded:Ductus.FluentDockerTest/Ductus.FluentDockerTest.MultiContainerTestFiles/index.js", "/src")
.Add("index.js", "/src")
.ExposePorts(8080)
.Command("nodemon", "/src/index.js").Builder()
//
// Redis Db Backend
.UseContainer().WithName("redis").UseImage("redis").Builder()
// Node server 1 & 2
Expand Down
3 changes: 2 additions & 1 deletion Ductus.FluentDockerTest/MultiContainerTestFiles/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

user nginx;
worker_processes 4;

events { worker_connections 1024; }
Expand All @@ -8,7 +10,6 @@ http {
least_conn;
server node1:8080 weight=10 max_fails=3 fail_timeout=30s;
server node2:8080 weight=10 max_fails=3 fail_timeout=30s;
server node3:8080 weight=10 max_fails=3 fail_timeout=30s;
}

server {
Expand Down

0 comments on commit be82f0a

Please sign in to comment.