$STACK_NAME in FastCGI hostname
This commit is contained in:
parent
015c2578d4
commit
4439819118
2
abra.sh
2
abra.sh
|
@ -1,4 +1,4 @@
|
|||
export NGINX_DEFAULT_CONF_VERSION=v4
|
||||
export NGINX_DEFAULT_CONF_VERSION=v5
|
||||
export PHP_UPLOADS_CONF_VERSION=v3
|
||||
export ENTRYPOINT_CONF_VERSION=v2
|
||||
export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1
|
||||
|
|
|
@ -55,6 +55,8 @@ services:
|
|||
configs:
|
||||
- source: nginx_default_conf
|
||||
target: /etc/nginx/conf.d/default.conf
|
||||
environment:
|
||||
- STACK_NAME
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost"]
|
||||
# interval: 30s
|
||||
|
@ -100,6 +102,7 @@ configs:
|
|||
nginx_default_conf:
|
||||
name: ${STACK_NAME}_nginx_default_conf_${NGINX_DEFAULT_CONF_VERSION}
|
||||
file: nginx.conf
|
||||
template_driver: golang
|
||||
php_uploads_conf:
|
||||
name: ${STACK_NAME}_php_uploads_conf_${PHP_UPLOADS_CONF_VERSION}
|
||||
file: uploads.ini
|
||||
|
|
|
@ -33,7 +33,7 @@ server {
|
|||
#
|
||||
location ~ \.php$ {
|
||||
try_files $uri /index.php =404;
|
||||
fastcgi_pass app:9000;
|
||||
fastcgi_pass {{ env "STACK_NAME" }}_app:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
|
@ -51,4 +51,4 @@ server {
|
|||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue