feat: Initialize NxMesh project with Docker, Nginx, PostgreSQL, and Rust backend
- Add Docker Compose configuration for development environment - Create Nginx configuration files for routing and health checks - Set up PostgreSQL database with health checks - Add .dockerignore and .gitignore files to exclude unnecessary files - Initialize Cargo.toml and Cargo.lock for Rust dependencies - Include GNU General Public License for project - Add README.md for project description - Create Justfile for development workflow commands
This commit is contained in:
20
.devcontainer/nginx/conf.d/default.conf
Normal file
20
.devcontainer/nginx/conf.d/default.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
# Default nginx configuration
|
||||
# The agent can dynamically modify this to route traffic as needed
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
# Default health check
|
||||
location /health {
|
||||
access_log off;
|
||||
return 200 "nginx ok\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
|
||||
# Default stub - agent configures actual routing
|
||||
location / {
|
||||
return 200 "NxMesh Data Plane\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
}
|
||||
38
.devcontainer/nginx/nginx.conf
Normal file
38
.devcontainer/nginx/nginx.conf
Normal file
@@ -0,0 +1,38 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Docker internal DNS resolver for dynamic upstreams
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
client_max_body_size 100M;
|
||||
|
||||
# Gzip compression
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/json application/javascript application/xml+rss application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
|
||||
|
||||
# Include server configurations
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
Reference in New Issue
Block a user