K
K
Kroid2014-11-30 16:44:42
Nginx
Kroid, 2014-11-30 16:44:42

Docker: nginx and unicorn on different containers?

Situation: there is one physical machine running nginx, postgres and several independent rail applications. I want to isolate them from each other using docker containers and simplify the deployment of new applications.
I'm trying to separate all this into separate containers and ran into this problem: nginx proxies a request through a unicorn socket, but, as far as I know, containers cannot link through unix sockets. How to be?

upstream app_server {
    server unix:/path/to/.unicorn.sock fail_timeout=0;
  }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-11-30
@Kroid

link over the network. For example:

upstream app_server {
    server http://localhost:3451;
}

You can also use things like skydns for easy sorting and replacement of containers during deployment.

A
Alexey Kolosov, 2014-11-30
@satisFUCKtor

you can try using the -v docker option to map an external directory, for example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question