parent
dc9b211ae3
commit
e49e7fb960
@ -0,0 +1,13 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY conf.d /etc/nginx/
|
||||
|
||||
COPY ../src/main/ui /var/www/royalpay
|
||||
|
||||
COPY upstream.conf.tpl /opt/upstream.conf.tpl
|
||||
|
||||
RUN apk add gettext
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD envsubst < /opt/upstream.conf.tpl > /etc/nginx/conf.d/upstream.conf && exec nginx -g 'daemon off;'
|
@ -0,0 +1,212 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _ default;
|
||||
underscores_in_headers on;
|
||||
proxy_ignore_client_abort on;
|
||||
client_max_body_size 0;
|
||||
|
||||
access_log logs/mpay.log;
|
||||
|
||||
location / {
|
||||
root /var/www/royalpay/;
|
||||
try_files $uri $uri/login.html @route;
|
||||
}
|
||||
|
||||
location @route {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
}
|
||||
server {
|
||||
listen 3000;
|
||||
server_name _ default;
|
||||
|
||||
location ~ ^/api/v1.0/retail/((?!(app|rsvc)).)+ {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
|
||||
}
|
||||
|
||||
location /oauth {
|
||||
proxy_pass http://rpgateway;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
location /api/v1.0/retail/app {
|
||||
proxy_pass http://rpgateway;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/api/v1.0/((jd)|(customs)|(alipay)|(rpay)|(yeepay)|(lakala_pay)|(cb_bankpay)|(bestpay)|(hf)|(wechat_jsapi_gateway)|(h5_payment)|(gateway)|(hf_gateway)|(jd_gateway)|(micropay)|(retail_qrcode)|(jsapi_gateway)|(share_code)|(payment))/ {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
|
||||
}
|
||||
|
||||
location /static {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
location /api/wechat {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
|
||||
}
|
||||
|
||||
location /api/payment/v1.0/wechat_jsapi_payment/ {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
|
||||
}
|
||||
|
||||
location /partner/cashiers/payment {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
|
||||
}
|
||||
|
||||
location /client/goods {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
|
||||
}
|
||||
|
||||
location /goods/payment {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
location /dev/status {
|
||||
proxy_pass http://rppaycenter;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://rpmanage;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Real-IP $remote_addr;
|
||||
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
upstream rpmanage{
|
||||
server ${manage_svc};
|
||||
}
|
||||
upstream rppaycenter{
|
||||
server ${paycenter_svc};
|
||||
}
|
||||
upstream rptrans{
|
||||
server ${trans_svc};
|
||||
}
|
||||
upstream rpgateway{
|
||||
server ${gtway_svc};
|
||||
}
|
Loading…
Reference in new issue