Sign inSign up

guog/carbon

By guog

•Updated about 6 years ago

carbon is part of holisec-smp.

Image
0

50K+

guog/carbon repository overview

⁠Carbon

安管前端build代码.

⁠Dockerfile

FROM nginx:latest
MAINTAINER guog [email protected]

RUN uname -a

COPY . /app/
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

⁠Nginx配置

nginx.conf

server {
  listen                  80;
  server_name             localhost;
  #前端打包的路径
  root                    /app;
  index                   index.html;
  #防止重刷新返回404
  error_page              404 /index.html;
  #GraphQL转发地址
  location ^~ /graphql/ {
    proxy_pass             http://localhost:8080/;
    proxy_send_timeout     1800;
    proxy_read_timeout     1800;
    proxy_connect_timeout  1800;
    client_max_body_size   2048m;
    proxy_http_version     1.1;
    proxy_set_header       Host $host;
    proxy_set_header       accept-encodeing 'gzip, deflate';
    proxy_set_header       content-type 'application/json';
    proxy_set_header       authorization $http_authorization;
    proxy_set_header       accept '*/*';
    proxy_set_header       x-bce-date $http_x_bce_date;
    proxy_set_header       Upgrade $http_upgrade;
    proxy_set_header       Connection "Upgrade";
    proxy_set_header       X-Real-IP $remote_addr; # pass on real client's IP
    proxy_set_header       X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header       X-Forwarded-Proto $scheme;
  }
  #转换器转发地址
  location ^~ /adapter/ {
    proxy_pass             http://localhost:9090/;
    proxy_send_timeout     1800;
    proxy_read_timeout     1800;
    proxy_connect_timeout  1800;
    client_max_body_size   2048m;
    proxy_http_version     1.1;
    proxy_set_header       Host $host;
    proxy_set_header       accept-encodeing 'gzip, deflate';
    proxy_set_header       content-type 'application/json';
    proxy_set_header       authorization $http_authorization;
    proxy_set_header       accept '*/*';
    proxy_set_header       x-bce-date $http_x_bce_date;
    proxy_set_header       Upgrade $http_upgrade;
    proxy_set_header       Connection "Upgrade";
    proxy_set_header       X-Real-IP $remote_addr; # pass on real client's IP
    proxy_set_header       X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header       X-Forwarded-Proto $scheme;
  }
}

Tag summary

Content type

Image

Digest

Size

87.4 MB

Last updated

about 6 years ago

docker pull guog/carbon