add nginx override
This commit is contained in:
parent
d929d8de67
commit
55b14d7f83
3 changed files with 11 additions and 4 deletions
|
@ -83,10 +83,10 @@ function include_docker {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
include_docker "$CRIMSON_ROOT/docker/docker-compose.base.yml" "true"
|
include_docker "$CRIMSON_ROOT/docker/docker-compose.base.yml" "true"
|
||||||
include_docker "$CRIMSON_ROOT/docker/docker-compose.db.yml" "$POSTGRES_ENABLED"
|
include_docker "$CRIMSON_ROOT/docker/docker-compose.db.yml" "$POSTGRES_ENABLED"
|
||||||
include_docker "$CRIMSON_ROOT/docker/docker-compose.api.yml" "$API_ENABLED"
|
include_docker "$CRIMSON_ROOT/docker/docker-compose.api.yml" "$API_ENABLED"
|
||||||
include_docker "$PROJECT_ROOT/docker-compose.override.yml" "true"
|
include_docker "$PROJECT_ROOT/conf/docker-compose.override.yml" "true"
|
||||||
|
|
||||||
# set project name
|
# set project name
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
## disable api if not set to "true"
|
||||||
if [ ! "$API_ENABLED" = "true" ]; then
|
if [ ! "$API_ENABLED" = "true" ]; then
|
||||||
echo "" > /etc/nginx/nginx.api.conf
|
echo "" > /etc/nginx/nginx.api.conf
|
||||||
echo "" > /etc/nginx/nginx.api.server.conf
|
echo "" > /etc/nginx/nginx.api.server.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## make sure override files exist as empty if not found
|
||||||
|
touch /etc/nginx/nginx.override.conf
|
||||||
|
touch /etc/nginx/nginx.override.server.conf
|
||||||
|
|
||||||
exec -a /usr/sbin/nginx /usr/sbin/nginx -c /etc/nginx/nginx.conf
|
exec -a /usr/sbin/nginx /usr/sbin/nginx -c /etc/nginx/nginx.conf
|
||||||
|
|
|
@ -18,6 +18,7 @@ http {
|
||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
|
|
||||||
include "nginx.api.conf";
|
include "nginx.api.conf";
|
||||||
|
include "nginx.override.conf";
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8080;
|
||||||
|
@ -32,6 +33,7 @@ http {
|
||||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml image/x-icon;
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml image/x-icon;
|
||||||
|
|
||||||
include "nginx.api.server.conf";
|
include "nginx.api.server.conf";
|
||||||
|
include "nginx.override.server.conf";
|
||||||
|
|
||||||
location /favicon.ico {
|
location /favicon.ico {
|
||||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
|
Loading…
Reference in a new issue