Refactor nginx setup to use host-level configuration
- Remove main nginx ingress container from docker-compose - Add minimal api-nginx container for FastCGI to HTTP conversion - Expose services directly on ports 7654 (API) and 7655 (UI) - Add comprehensive NGINX_SETUP.md documentation - Include example host nginx configuration - Update docker setup script for new architecture This change allows OpnForm to integrate better with existing host nginx setups by removing the containerized ingress and exposing services directly to the host for reverse proxy configuration.
This commit is contained in:
43
docker/api-nginx.conf
Normal file
43
docker/api-nginx.conf
Normal file
@@ -0,0 +1,43 @@
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html/public;
|
||||
index index.php;
|
||||
|
||||
client_max_body_size 64M;
|
||||
|
||||
# Logging
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stderr;
|
||||
|
||||
# Handle all requests through PHP
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
# PHP-FPM configuration
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass opnform-api:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/public/index.php;
|
||||
fastcgi_param DOCUMENT_ROOT /usr/share/nginx/html/public;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_read_timeout 300;
|
||||
}
|
||||
|
||||
# Deny access to . files
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user