fix: 码全代码添加
This commit is contained in:
13
template/cvbp/dockerfile/java.dockerfile
Normal file
13
template/cvbp/dockerfile/java.dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM openjdk:8
|
||||
ENV APP_VERSION __APP_VERSION__
|
||||
WORKDIR /app
|
||||
COPY __APP_JAR_PATH__ /app/
|
||||
CMD mkdir -p /app/logs; \
|
||||
java -server \
|
||||
-XX:OnOutOfMemoryError="kill -9 %p" \
|
||||
${EXT_JVM_CMD} \
|
||||
-Dfile.encoding=UTF-8 \
|
||||
${EXT_APM_CMD} \
|
||||
-jar __APP_JAR_FILENAME__ \
|
||||
--swagger.enable=false \
|
||||
${EXT_APP_CMD}
|
||||
8
template/cvbp/dockerfile/postgres.dockerfile
Normal file
8
template/cvbp/dockerfile/postgres.dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM postgres:13.10
|
||||
|
||||
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
||||
RUN apt-get clean
|
||||
RUN apt-get update
|
||||
RUN apt-get install wget -y
|
||||
RUN apt-get install postgresql-13-postgis-3 -y
|
||||
RUN apt-get install postgis -y
|
||||
2
template/cvbp/dockerfile/wrapper/Dockerfile
Normal file
2
template/cvbp/dockerfile/wrapper/Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM nginx:latest
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||
62
template/cvbp/dockerfile/wrapper/default.conf
Normal file
62
template/cvbp/dockerfile/wrapper/default.conf
Normal file
@@ -0,0 +1,62 @@
|
||||
upstream pc-proxy {
|
||||
server pc:80;
|
||||
}
|
||||
|
||||
upstream mobile-proxy {
|
||||
server mobile:80;
|
||||
}
|
||||
|
||||
upstream backend-api {
|
||||
server backend:8089;
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
absolute_redirect off;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 5;
|
||||
gzip_types application/javascript application/x-javascript text/javascript text/css image/jpeg image/gif image/png;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
gzip_vary on;
|
||||
|
||||
location /web/ {
|
||||
proxy_pass http://pc-proxy/web/;
|
||||
}
|
||||
|
||||
location /app/ {
|
||||
proxy_pass http://mobile-proxy/app/;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
add_header Access-Control-Allow-Credentials true;
|
||||
add_header Access-Control-Allow-Origin $http_origin;
|
||||
add_header Access-Control-Allow-Headers *;
|
||||
add_header Access-Control-Allow-Methods *;
|
||||
proxy_http_version 1.1;
|
||||
proxy_read_timeout 7200;
|
||||
client_max_body_size 200m;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-HOST $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_pass http://backend-api/;
|
||||
}
|
||||
|
||||
location /files/ {
|
||||
alias /data/files/;
|
||||
}
|
||||
|
||||
location /manager/sysFile/download/ {
|
||||
alias /data/files/;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user