diff --git a/sf-ui/Dockerfile b/sf-ui/Dockerfile index 73e5a8c..ab69170 100644 --- a/sf-ui/Dockerfile +++ b/sf-ui/Dockerfile @@ -1,3 +1,4 @@ FROM registry.zsmarter.com/public/nginx:1.22.1 RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories COPY ./sf-ui/dist /app/nginx/html +COPY nginx.conf /etc/nginx/nginx.conf diff --git a/sf-ui/nginx.conf b/sf-ui/nginx.conf new file mode 100644 index 0000000..3846ef2 --- /dev/null +++ b/sf-ui/nginx.conf @@ -0,0 +1,43 @@ + +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 65; + + #gzip on; + + server { + listen 80; + server_name localhost; + charset utf-8; + + #access_log logs/host.access.log main; + + location / { + root html; + index index.html index.htm; + } + + location /stage-api/ { + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header REMOTE-HOST $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://localhost:22009/; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + + } + +}