fix():
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
AUTH_GRPC_PORT=50052
|
||||
AUTH_HTTP_PORT=8081
|
||||
AUTH_GRPC_PORT=50051
|
||||
AUTH_HTTP_PORT=8080
|
||||
AUTH_GRPC_ENABLE_REFLECTION=true
|
||||
|
||||
POSTGRES_HOST=postgres
|
||||
|
||||
@@ -1,31 +1,19 @@
|
||||
# Competition Service Configuration
|
||||
|
||||
# gRPC server port
|
||||
COMPETITION_GRPC_PORT=50053
|
||||
|
||||
# Enable/disable gRPC reflection
|
||||
COMPETITION_GRPC_PORT=50051
|
||||
COMPETITION_GRPC_ENABLE_REFLECTION=true
|
||||
COMPETITION_HTTP_PORT=8080
|
||||
|
||||
# HTTP server port (if applicable)
|
||||
COMPETITION_HTTP_PORT=8082
|
||||
|
||||
# Log level (e.g., debug, info, warn, error)
|
||||
LOG_LEVEL=info
|
||||
|
||||
# PostgreSQL database connection
|
||||
POSTGRES_HOST=postgres
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_USERNAME=postgres
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_DATABASE=postgres
|
||||
|
||||
# Address of the authentication gRPC service
|
||||
AUTH_SVC_ADDR=auth:50052
|
||||
AUTH_SVC_ADDR=auth:50051
|
||||
|
||||
# Redis connection for caching
|
||||
REDIS_ADDR=redis:6379
|
||||
REDIS_PASSWORD=
|
||||
REDIS_DB=0
|
||||
|
||||
# Enable/disable caching
|
||||
CACHE_ENABLED=true
|
||||
CACHE_ENABLED=true
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
SERVER_PORT=8080
|
||||
SERVER_HOST=0.0.0.0
|
||||
|
||||
AUTH_SERVICE_ADDR=auth:50052
|
||||
USER_SERVICE_ADDR=user:50052
|
||||
COMPETITION_SERVICE_ADDR=competition:50052
|
||||
TASK_SERVICE_ADDR=task:50052
|
||||
SUBMISSION_SERVICE_ADDR=submission:50052
|
||||
RESULTS_SERVICE_ADDR=results:50052
|
||||
REVIEW_SERVICE_ADDR=review:50052
|
||||
ACHIEVEMENTS_SERVICE_ADDR=achievements:50052
|
||||
AUTH_SERVICE_ADDR=auth:50051
|
||||
USER_SERVICE_ADDR=user:50051
|
||||
COMPETITION_SERVICE_ADDR=competition:50051
|
||||
TASK_SERVICE_ADDR=task:50051
|
||||
SUBMISSION_SERVICE_ADDR=submission:50051
|
||||
RESULTS_SERVICE_ADDR=results:50051
|
||||
REVIEW_SERVICE_ADDR=review:50051
|
||||
ACHIEVEMENTS_SERVICE_ADDR=achievements:50051
|
||||
|
||||
AWS_ACCESS_KEY_ID=your_access_key_here
|
||||
AWS_SECRET_ACCESS_KEY=your_secret_key_here
|
||||
AWS_REGION=us-east-1
|
||||
S3_BUCKET=datarush-submissions
|
||||
S3_ENDPOINT=
|
||||
AWS_ACCESS_KEY_ID=admin
|
||||
AWS_SECRET_ACCESS_KEY=password
|
||||
AWS_REGION=
|
||||
S3_BUCKET=datarush
|
||||
S3_ENDPOINT=http://localhost:9000
|
||||
|
||||
JWT_SECRET=your_jwt_secret_here
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
POSTGRES_HOST=localhost
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_USERNAME=postgres
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_DATABASE=postgres
|
||||
@@ -0,0 +1,3 @@
|
||||
MINIO_ROOT_USER=admin
|
||||
MINIO_ROOT_PASSWORD=password
|
||||
MINIO_VOLUMES=/data
|
||||
@@ -0,0 +1,156 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 4096;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
ssl_session_cache shared:SSL:50m;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_tickets off;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256;
|
||||
ssl_ecdh_curve X25519:secp521r1:secp384r1;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
resolver_timeout 5s;
|
||||
server_names_hash_bucket_size 128;
|
||||
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-XSS-Protection "0";
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
|
||||
add_header Permissions-Policy "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()" always;
|
||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https:; img-src 'self' data: https:; style-src 'self' 'unsafe-inline' https:; font-src 'self' https:; frame-ancestors 'none'; form-action 'self'; object-src 'none'; base-uri 'self';" always;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 75;
|
||||
client_body_timeout 15;
|
||||
client_header_timeout 15;
|
||||
reset_timedout_connection on;
|
||||
send_timeout 15;
|
||||
|
||||
client_body_buffer_size 128k;
|
||||
client_header_buffer_size 4k;
|
||||
client_max_body_size 100M;
|
||||
large_client_header_buffers 4 16k;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_min_length 1024;
|
||||
gzip_types
|
||||
text/plain
|
||||
text/css
|
||||
text/xml
|
||||
text/javascript
|
||||
application/json
|
||||
application/javascript
|
||||
application/x-javascript
|
||||
application/xml
|
||||
application/xml+rss
|
||||
font/woff
|
||||
font/woff2
|
||||
image/svg+xml;
|
||||
|
||||
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;
|
||||
|
||||
server_tokens off;
|
||||
|
||||
upstream gw {
|
||||
zone gw 64k;
|
||||
server gw:8080 resolve;
|
||||
}
|
||||
|
||||
upstream minio {
|
||||
zone minio 64k;
|
||||
server minio:9000 resolve;
|
||||
}
|
||||
|
||||
upstream minio-ui {
|
||||
zone minio-ui 64k;
|
||||
server minio:9001 resolve;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
proxy_pass http://gw;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name minio;
|
||||
|
||||
http2 on;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
|
||||
ignore_invalid_headers off;
|
||||
client_max_body_size 0;
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_connect_timeout 300;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
chunked_transfer_encoding off;
|
||||
|
||||
proxy_pass http://minio;
|
||||
}
|
||||
|
||||
location /minio/ui/ {
|
||||
rewrite ^/minio/ui/(.*) /$1 break;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
|
||||
real_ip_header X-Real-IP;
|
||||
|
||||
proxy_connect_timeout 300;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
chunked_transfer_encoding off;
|
||||
|
||||
proxy_pass http://minio-ui;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user