Skip to content

Modular logistics and supply chain operating system (LSOS)

Parametrise nginx app hostname

Eugene Dementyev45387cb360d6
diff --git a/docker/httpd/Dockerfile b/docker/httpd/Dockerfile
index fa8d8d0a..3aa9424c 100644
--- a/docker/httpd/Dockerfile
+++ b/docker/httpd/Dockerfile
@@ -1,5 +1,7 @@
# alpine is more secure
FROM nginx:stable-alpine
-COPY docker/httpd/vhost.conf /etc/nginx/conf.d/default.conf
-COPY api/public/ /var/www/html/api/public/
\ No newline at end of file
+ENV NGINX_APPLICATION_HOSTNAME application
+
+COPY docker/httpd/vhost.conf /etc/nginx/templates/default.conf.template
+COPY api/public/ /var/www/html/api/public/
diff --git a/docker/httpd/vhost.conf b/docker/httpd/vhost.conf
index 2adf349b..0c9ad15a 100644
--- a/docker/httpd/vhost.conf
+++ b/docker/httpd/vhost.conf
@@ -34,7 +34,7 @@ server {
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
- fastcgi_pass application:9000;
+ fastcgi_pass ${NGINX_APPLICATION_HOSTNAME}:9000;
fastcgi_index index.php;
}
-}
\ No newline at end of file
+}