1
0

fix: docker多步骤构建

This commit is contained in:
TsMask
2024-01-12 10:25:28 +08:00
parent bb6a929720
commit fd56dda836
4 changed files with 143 additions and 41 deletions

View File

@@ -0,0 +1,13 @@
-----BEGIN DH PARAMETERS-----
MIICCAKCAgEAlgLQ4jKKVmeAuZG3w7+QNXh/hJIba+/eHV3PA0zGBCyN63lqOED/
87/WzUKQxLuzJeSiQ3EGPUit/aVRS8guAajFXLx81Lj5BaID8GWhJziQUk97GX6E
UyAvHqZdtJNNp30ds3A5KL/p09Wo6HGvCYwYCFdJwkR26PGFitjDR2KYkuCzAnbx
iiMAb67pP0KtGBkShgvJUTnSs1Klpofh9ylf20QuR9oZ9+NtOMhGa3ttNIcIwxem
Uqk8n5OP9PM5DX2TqL4fD4o43+UNKPdSbyv2dOCyLTGD6nmz/Jwx7vd1s+DKeWIq
y/Sce8+DybCuto+tJACsWRh9W6JL/O4vBuZeU+wp8V4/kGutcsVisAaKKGgJEMSi
FEMu5FQRKdi2vP4wbZcG5usmgRlXQN9rJXuJ3yigmj8ffrdyCCDAMniTflta02n+
RJv0329h4OYzdMkb1+IMwr+0go0KfiahDfaCeO/8OYlA5dzeVAbGE8dHTG2j9Lpr
M/SoAcObUEHnMDS0FCrnyMVimUKOZoPhpo/xUdVFYoM73okFN0qG76b/Vj6Je1SN
xOV8e0riVJnB4j07CnXpNuUDBgxqaVWpoZa2NU/94KwCukuPZppzk3d3QrfV01lq
XKlIcvLVW1rrq1Ty0f9YMqim7K6LE4/kUBurA4nGUyFx/p+KfxkcysMCAQI=
-----END DH PARAMETERS-----

View File

@@ -1,44 +1,94 @@
user nginx;
worker_processes auto;
# /etc/nginx/nginx.conf
error_log /var/log/omc/nginx/error.log notice;
user nginx;
pid /var/run/nginx.pid;
# Enables the use of JIT for regular expressions to speed-up their processing.
pcre_jit on;
# Configures default error logger.
error_log /var/log/omc/nginx/error.log warn;
events {
worker_connections 1024;
}
# The maximum number of simultaneous connections that can be opened by
# a worker process.
worker_connections 1024;
}
http {
include mime.types;
# Includes mapping of file name extensions to MIME types of responses
# and defines the default type.
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Name servers used to resolve names of upstream servers into addresses.
# It's also needed when using tcpsocket and udpsocket in Lua modules.
#resolver 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001;
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/omc/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
# Don't tell nginx version to the clients. Default is 'on'.
server_tokens off;
#开启gzip功能
# Specifies the maximum accepted body size of a client request, as
# indicated by the request header Content-Length. If the stated content
# length is greater than this size, then the client receives the HTTP
# error code 413. Set to 0 to disable. Default is '1m'.
client_max_body_size 1024m;
# Sendfile copies data between one FD and other from within the kernel,
# which is more efficient than read() + write(). Default is off.
sendfile on;
# Causes nginx to attempt to send its HTTP response head in one packet,
# instead of using partial frames. Default is 'off'.
tcp_nopush on;
# Enables the specified protocols. Default is TLSv1 TLSv1.1 TLSv1.2.
# TIP: If you're not obligated to support ancient clients, remove TLSv1.1.
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
# Path of the file with Diffie-Hellman parameters for EDH ciphers.
# TIP: Generate with: `openssl dhparam -out /etc/ssl/nginx/dh2048.pem 2048`
ssl_dhparam /usr/local/omc/nginx/cert/dhparams.pem;
# Specifies that our cipher suits should be preferred over client ciphers.
# Default is 'off'.
ssl_prefer_server_ciphers on;
# Enables a shared SSL cache with size that can hold around 8000 sessions.
# Default is 'none'.
ssl_session_cache shared:SSL:2m;
# Specifies a time during which a client may reuse the session parameters.
# Default is '5m'.
ssl_session_timeout 1h;
# Disable TLS session tickets (they are insecure). Default is 'on'.
ssl_session_tickets off;
# Helper variable for proxying websockets.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# Specifies the main log format.
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
# Sets the path, format, and configuration for a buffered log write.
access_log /var/log/omc/nginx/access.log main;
keepalive_timeout 65;
# Enable gzipping of responses.
gzip on;
#开启gzip静态压缩功能
gzip_static on;
#gzip缓存大小
gzip_buffers 4 16k;
#gzip http版本
gzip_http_version 1.1;
#gzip 压缩级别 1-10
gzip_comp_level 5;
#gzip 压缩类型
gzip_types text/plain application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
# 是否在http header中添加Vary: Accept-Encoding建议开启
# Set the Vary HTTP header as defined in the RFC 2616. Default is 'off'.
gzip_vary on;
server {
@@ -62,7 +112,7 @@ http {
}
location / {
root /usr/local/omc/bin/frontend;
root /usr/local/bin/omc-frontend;
try_files $uri $uri/ /index.html;
index index.html index.htm;