Commit 6a3ef8d6 authored by daidekun's avatar daidekun

移除ui项目、nginx项目,切版本到12251535

parent 7c7c3bdc
FROM 192.168.4.36/baseimg/centos:12282332 FROM 192.168.4.36/baseimg/centos:12251535
MAINTAINER daidekun "dekun.dai@quantgroup.cn" MAINTAINER daidekun "dekun.dai@quantgroup.cn"
......
FROM nginx
MAINTAINER kalvin "dekun.dai@quantgroup.cn"
COPY auto-reload-nginx.sh /home/auto-reload-nginx.sh
RUN chmod +x /home/auto-reload-nginx.sh
# #替换源
WORKDIR /etc/apt/
RUN mv sources.list /tmp
RUN echo deb http://mirrors.163.com/debian/ stretch main non-free contrib >> sources.list \
&& echo deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib >> sources.list \
&& echo deb-src http://mirrors.163.com/debian/ stretch main non-free contrib >> sources.list \
&& echo deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib >> sources.list \
&& echo deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib >> sources.list \
&& echo deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib >> sources.list
RUN apt-get update \
&& apt-get install --assume-yes --no-install-recommends\
apt-transport-https \
iputils-ping \
build-essential \
bzip2 \
curl \
git \
rlwrap \
vim \
inotify-tools \
&& curl -sL https://deb.nodesource.com/setup_6.x | bash - \
&& apt-get install --assume-yes --no-install-recommends nodejs \
&& apt-get clean
CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
#!/bin/sh
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
nginx "$@"
oldcksum=`cksum /etc/nginx/conf.d/default.conf`
inotifywait -e modify,move,create,delete -mr --timefmt '%d/%m/%y %H:%M' --format '%T' \
/etc/nginx/conf.d/ | while read date time; do
newcksum=`cksum /etc/nginx/conf.d/default.conf`
if [ "$newcksum" != "$oldcksum" ]; then
echo "At ${time} on ${date}, config file update detected."
oldcksum=$newcksum
nginx -s reload
fi
done
\ No newline at end of file
FROM 192.168.4.36/baseimg/centos:12282332 FROM 192.168.4.36/baseimg/centos:12251535
MAINTAINER kalvin "dekun.dai@quantgroup.cn" MAINTAINER kalvin "dekun.dai@quantgroup.cn"
......
FROM 192.168.4.36/baseimg/centos:12282332 FROM 192.168.4.36/baseimg/centos:12251535
MAINTAINER kalvin.dai <dekun.dai@quantgroup.cn> MAINTAINER kalvin.dai <dekun.dai@quantgroup.cn>
ARG RESTY_LUAROCKS_VERSION="2.4.3" ARG RESTY_LUAROCKS_VERSION="2.4.3"
......
FROM 192.168.4.36/baseimg/jdk8:12282332 FROM 192.168.4.36/baseimg/jdk8:12251535
USER root USER root
......
FROM 192.168.4.36/baseimg/openresty:12282332 FROM 192.168.4.36/baseimg/openresty:12251535
ARG BUILD_NUMBER ARG BUILD_NUMBER
ARG SYSTEM_NAME ARG SYSTEM_NAME
......
FROM 192.168.4.36/baseimg/nodejs:12282332 FROM 192.168.4.36/baseimg/nodejs:12251535
MAINTAINER kalvin "dekun.dai@quantgroup.cn" MAINTAINER kalvin "dekun.dai@quantgroup.cn"
ARG BUILD_NUMBER ARG BUILD_NUMBER
......
FROM 192.168.4.36/baseimg/nginx
MAINTAINER kalvin "dekun.dai@quantgroup.cn"
ARG BUILD_NUMBER
ARG SYSTEM_NAME
ARG BRANCH_NAME
ENV BUILD_NUMBER=$BUILD_NUMBER
ENV SYSTEM_NAME=$SYSTEM_NAME
ENV BRANCH_NAME=$BRANCH_NAME
ENV NODE_ENV=test
USER root
WORKDIR /home/quant_group
RUN mkdir project
RUN echo "BUILD_NUMBER: ${BUILD_NUMBER},SYSTEM_NAME: ${SYSTEM_NAME},BRANCH_NAME: ${BRANCH_NAME}" >> ./build_info
EXPOSE 80
COPY docker-entrypoint.sh .
COPY dist.tgz ./project/dist.tgz
COPY default.conf /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/nginx.conf
RUN chmod +x ./docker-entrypoint.sh
CMD ./docker-entrypoint.sh project
VOLUME /home/quant_group/logs/
server {
listen 80;
server_name _;
location / {
root /home/quant_group/project/public;
try_files $uri $uri/ /index.html;
}
}
#!/bin/sh
echo "deploy ui"
module_name="project"
package_path="/home/quant_group/${module_name}"
echo "cd ${package_path}"
cd ${package_path}
echo "mkdir -p public"
mkdir -p ${package_path}/public
echo "rm public/* -rf"
rm ${package_path}/public/* -rf
echo "tar zxf dist.tgz -C ${package_path}/public"
tar zxf ${package_path}/dist.tgz -C ${package_path}/public
echo "sed sed xyqb.com to q-gp.com"
namespace=`cat /var/run/secrets/kubernetes.io/serviceaccount/namespace`
echo "namespace is $namespace"
find ${package_path}/ -name "*.js" | xargs sed -i "s/.xyqb.com/-$namespace.q-gp.com/g"
echo "mv public/dist/* public"
mv ${package_path}/public/dist/* public
echo "rm dist.tgz public/dist -rf"
rm ${package_path}/dist.tgz ${package_path}/public/dist -rf
echo "nginx -g 'daemon off;'"
nginx -g 'daemon off;'
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
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/nginx/access.log main;
server_names_hash_bucket_size 64;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment