提交 b1428010 authored 作者: lihonglin's avatar lihonglin

增加docker打包文件

上级 ccf73028
<?xml version="1.0" encoding="UTF-8"?>
<project name="php" default="build">
<target name="build" depends=""/>
<property name="version-m" value="1.1" />
<property name="version" value="1.1.0" />
<property name="stability" value="stable" />
<property name="releasenotes" value="" />
<!-- 定义打包命名规则 -->
<property name="tarfile" value="${phing.project.name}.tar.gz" />
<property name="pkgfile" value="${phing.project.name}.${version}.tgz" />
<!-- 定义打包路径 -->
<property name="distfile" value="dist/${tarfile}" />
<!-- 定义需要打包的文件目录 -->
<fileset id="php.tar.gz" dir=".">
<include name="*.php"/>
</fileset>
<!-- 检测是否定义了相关的变量 -->
<target name="check" description="Check variables" >
<fail unless="version" message="Version not defined!" />
<fail unless="buildnumber" message="buildnumber not defined!" />
<fail unless="buildid" message="buildid not defined!" />
<delete dir="dist" failonerror="false" />
<mkdir dir="dist" />
</target>
<!-- 配置打包命令 -->
<target name="tar" depends="check" description="Create tar file for release">
<delete file="${distfile}" failonerror="false"/>
<tar destfile="${distfile}" compression="gzip">
<fileset refid="php.tar.gz"/>
</tar>
</target>
</project>
FROM registry.k8s.lefull.cn:5000/lefull/nginx-php56:1.0
MAINTAINER 305727638@qq.com
ADD ./dist/php.tar.gz /www/
COPY default.conf /etc/nginx/conf.d/
\ No newline at end of file
server
{
listen 80;
server_name localhost;
charset utf-8;
root /www/shop/web;
index index.php index.html index.htm;
location / {
index index.php index.html;
if (!-e $request_filename) {
rewrite /(.*)$ /index.php?r=$1 last;
}
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /www/shop/web$fastcgi_script_name;
include fastcgi_params;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论