docker-compose v0.2 (#318)
* fix regular dot * add yarn.lock to .gitignore * add docker-compose * add docker-compose * Delete PORTForm.tsx * Delete .gitignore * add .gitignore * Update .gitignore * add ifconfig * fix dockerfile filename * remove nginx.sh in Dockerfile * 1 修复agent缺失命令 2 二次构建二进制 3 mysql启动等待 * 1 修复agent缺失命令 2 二次构建二进制 3 mysql启动等待
This commit is contained in:
parent
1482cfcf32
commit
4b2ebf4761
|
@ -0,0 +1,12 @@
|
|||
FROM golang as builder
|
||||
WORKDIR /home/n9e/builder
|
||||
ENV GOPROXY=https://mirrors.aliyun.com/goproxy/
|
||||
RUN git clone https://hub.fastgit.org/didi/nightingale.git
|
||||
RUN nightingale/control build
|
||||
|
||||
FROM centos:7
|
||||
WORKDIR /home/n9e
|
||||
COPY --from=builder /home/n9e/builder/nightingale/ .
|
||||
COPY entrpoint.sh .
|
||||
RUN yum install mysql net-tools -y
|
||||
ENTRYPOINT ./entrpoint.sh
|
|
@ -1,7 +0,0 @@
|
|||
FROM centos:7
|
||||
WORKDIR /home/n9e
|
||||
COPY entrpoint.sh .
|
||||
ADD http://116.85.64.82/n9e-3.0.0.tar.gz .
|
||||
RUN tar xvf n9e-3.0.0.tar.gz
|
||||
RUN yum install mysql -y
|
||||
ENTRYPOINT ./entrpoint.sh
|
|
@ -2,13 +2,20 @@
|
|||
sed -i 's/127.0.0.1/mysql/g' etc/mysql.yml
|
||||
sed -i 's/addr: 127.0.0.1:6379/addr: redis:6379/g' etc/rdb.yml
|
||||
|
||||
mysql -hmysql -uroot -p1234 < sql/n9e_ams.sql
|
||||
mysql -hmysql -uroot -p1234 < sql/n9e_hbs.sql
|
||||
mysql -hmysql -uroot -p1234 < sql/n9e_job.sql
|
||||
mysql -hmysql -uroot -p1234 < sql/n9e_mon.sql
|
||||
mysql -hmysql -uroot -p1234 < sql/n9e_rdb.sql
|
||||
mysql -hmysql -uroot -p1234 < sql/n9e_rdb.sql
|
||||
mysql -hmysql -uroot -p1234 < sql/n9e_rdb.sql
|
||||
mysqlRootPassword=1234
|
||||
|
||||
until mysql -hmysql -u root -p$mysqlRootPassword -e ";" ; do
|
||||
echo "Can't connect mysql, retry"
|
||||
sleep 5
|
||||
done
|
||||
|
||||
mysql -hmysql -uroot -p$mysqlRootPassword < sql/n9e_ams.sql
|
||||
mysql -hmysql -uroot -p$mysqlRootPassword < sql/n9e_hbs.sql
|
||||
mysql -hmysql -uroot -p$mysqlRootPassword < sql/n9e_job.sql
|
||||
mysql -hmysql -uroot -p$mysqlRootPassword < sql/n9e_mon.sql
|
||||
mysql -hmysql -uroot -p$mysqlRootPassword < sql/n9e_rdb.sql
|
||||
mysql -hmysql -uroot -p$mysqlRootPassword < sql/n9e_rdb.sql
|
||||
mysql -hmysql -uroot -p$mysqlRootPassword < sql/n9e_rdb.sql
|
||||
|
||||
./control start all
|
||||
sleep infinity
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
FROM nginx
|
||||
WORKDIR /home/n9e
|
||||
COPY nginx.sh .
|
||||
COPY nginx.conf /etc/nginx
|
||||
ADD http://116.85.64.82/pub.20200928.tar.gz .
|
||||
RUN tar xvf pub.20200928.tar.gz
|
||||
|
|
Loading…
Reference in New Issue