From 2ef6ac3c086a96222d2e7b8bf91e4fbb7f45acc4 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Thu, 1 Sep 2016 20:04:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=20nginx=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D1=8C=20=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=B4?= =?UTF-8?q?=D1=81=D1=83=D0=BD=D1=83=D1=82=D1=8C=20=D0=BA=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D0=BE=D0=BC=D0=BD=D1=83=D1=8E=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA?= =?UTF-8?q?=D1=83=20=D0=BD=D0=B0=20php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 3 +-- docker/nginx/account.ely.by.conf.template | 2 +- docker/nginx/run.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3a4285c..773afd9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,14 +14,13 @@ services: web: build: ./docker/nginx - ports: - - "80:80" links: - app volumes_from: - app environment: - AUTHSERVER_HOST=authserver.ely.by + - PHP_LINK=app node-dev-server: build: ./frontend diff --git a/docker/nginx/account.ely.by.conf.template b/docker/nginx/account.ely.by.conf.template index 6bc993f..7430d72 100644 --- a/docker/nginx/account.ely.by.conf.template +++ b/docker/nginx/account.ely.by.conf.template @@ -31,7 +31,7 @@ server { } location ~* \.php$ { - fastcgi_pass app:9000; + fastcgi_pass ${PHP_LINK}:9000; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $host; diff --git a/docker/nginx/run.sh b/docker/nginx/run.sh index ba8bc4c..364e6e7 100644 --- a/docker/nginx/run.sh +++ b/docker/nginx/run.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -envsubst '$AUTHSERVER_HOST' < /etc/nginx/conf.d/account.ely.by.conf.template > /etc/nginx/conf.d/default.conf +envsubst '$AUTHSERVER_HOST:$PHP_LINK' < /etc/nginx/conf.d/account.ely.by.conf.template > /etc/nginx/conf.d/default.conf nginx -g 'daemon off;'