Working nginx config
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
f71e43949a
commit
42c6e8d553
2
abra.sh
2
abra.sh
|
@ -1,4 +1,4 @@
|
||||||
export NGINX_CONF_VERSION="v1"
|
export NGINX_CONF_VERSION="v2"
|
||||||
|
|
||||||
NC_APP_DIR="app:/var/www/html"
|
NC_APP_DIR="app:/var/www/html"
|
||||||
|
|
||||||
|
|
14
compose.yml
14
compose.yml
|
@ -109,13 +109,13 @@ services:
|
||||||
# entrypoint: /cron.sh
|
# entrypoint: /cron.sh
|
||||||
# deploy:
|
# deploy:
|
||||||
# labels: ['coop-cloud.${STACK_NAME}.cron.version=22.1.0-89d9ab98']
|
# labels: ['coop-cloud.${STACK_NAME}.cron.version=22.1.0-89d9ab98']
|
||||||
# cache:
|
cache:
|
||||||
# image: redis:6.2.5-alpine
|
image: redis:6.2.5-alpine
|
||||||
# networks:
|
networks:
|
||||||
# - internal
|
- internal
|
||||||
# deploy:
|
deploy:
|
||||||
# labels:
|
labels:
|
||||||
# - coop-cloud.${STACK_NAME}.cache.version=6.2.5-alpine-b658aeb0
|
- coop-cloud.${STACK_NAME}.cache.version=6.2.5-alpine-b658aeb0
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
db_root_password:
|
db_root_password:
|
||||||
|
|
|
@ -1,24 +1,45 @@
|
||||||
events {
|
worker_processes auto;
|
||||||
worker_connections 768;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_log /var/log/nginx/error.log warn;
|
error_log /var/log/nginx/error.log warn;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
http {
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
upstream backend {
|
sendfile on;
|
||||||
|
#tcp_nopush on;
|
||||||
|
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
#gzip on;
|
||||||
|
|
||||||
|
upstream php-handler {
|
||||||
server {{ env "STACK_NAME" }}_app:9000;
|
server {{ env "STACK_NAME" }}_app:9000;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80 http2;
|
listen 80;
|
||||||
listen [::]:80 http2;
|
|
||||||
server_name {{ env "DOMAIN" }};
|
# HSTS settings
|
||||||
|
# WARNING: Only add the preload option once you read about
|
||||||
|
# the consequences in https://hstspreload.org/. This option
|
||||||
|
# will add the domain to a hardcoded list that is shipped
|
||||||
|
# in all major browsers and getting removed from this list
|
||||||
|
# could take several months.
|
||||||
|
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
|
||||||
|
|
||||||
# set max upload size
|
# set max upload size
|
||||||
client_max_body_size 512M;
|
client_max_body_size 512M;
|
||||||
|
@ -112,17 +133,17 @@ http {
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
fastcgi_param PATH_INFO $path_info;
|
fastcgi_param PATH_INFO $path_info;
|
||||||
fastcgi_param HTTPS on;
|
#fastcgi_param HTTPS on;
|
||||||
|
|
||||||
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
fastcgi_param modHeadersAvailable true; # Avoid sending the security headers twice
|
||||||
fastcgi_param front_controller_active true; # Enable pretty urls
|
fastcgi_param front_controller_active true; # Enable pretty urls
|
||||||
fastcgi_pass backend;
|
fastcgi_pass php-handler;
|
||||||
|
|
||||||
fastcgi_intercept_errors on;
|
fastcgi_intercept_errors on;
|
||||||
fastcgi_request_buffering off;
|
fastcgi_request_buffering off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.(?:css|js|svg|gif|png|jpg|ico)$ {
|
location ~ \.(?:css|js|svg|gif)$ {
|
||||||
try_files $uri /index.php$request_uri;
|
try_files $uri /index.php$request_uri;
|
||||||
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
expires 6M; # Cache-Control policy borrowed from `.htaccess`
|
||||||
access_log off; # Optional: Don't log access to assets
|
access_log off; # Optional: Don't log access to assets
|
||||||
|
|
Loading…
Reference in New Issue