Commit a97a7b4a authored by Yuri Konotopov's avatar Yuri Konotopov

openshift: provide correct address of Django backend

parent fba419bf
......@@ -38,6 +38,8 @@ services:
build:
context: nginx
dockerfile: Dockerfile
environment:
EGO_NODE_ADDRESS: extensions-web
restart: always
links:
- extensions-web
......
......@@ -2,9 +2,11 @@ FROM nginx:stable
MAINTAINER Yuri Konotopov <ykonotopov@gnome.org>
COPY nginx.conf /etc/nginx
COPY nginx.conf /tmp
RUN set -ex \
&& envsubst < /tmp/nginx.conf > /etc/nginx/nginx.conf \
&& rm /tmp/nginx.conf \
&& mkdir -p /extensions-web/www \
&& chmod g+rwX -R /extensions-web/www \
&& chmod g+rwX -R /var/log/nginx \
......
......@@ -57,7 +57,7 @@ http {
}
location / {
uwsgi_pass extensions-web:8001;
uwsgi_pass ${EGO_NODE_ADDRESS}:8001;
include uwsgi_params;
}
}
......
......@@ -61,7 +61,7 @@
}
],
"selector": {
"name": "frontend"
"name": "extensions-web"
}
}
},
......@@ -181,7 +181,15 @@
"contextDir": "openshift/docker/nginx"
},
"strategy": {
"type": "Docker"
"type": "Docker",
"dockerStrategy": {
"env": [
{
"name": "EGO_NODE_ADDRESS",
"value": "${EGO_NODE_ADDRESS}"
}
]
}
},
"output": {
"to": {
......@@ -437,6 +445,12 @@
"description": "Database URL in format suitable for dj-database-url",
"value": ""
},
{
"name": "EGO_NODE_ADDRESS",
"displayName": "Address of extensions-web container",
"description": "Either DNS name or IP address. Should be localhost for Openshift.",
"value": "localhost"
},
{
"name": "EGO_SECRET_KEY",
"displayName": "Django secret key",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment