Skip to content

Commit 6de0546

Browse files
committed
source code
1 parent 4cdfb8b commit 6de0546

4,261 files changed

Lines changed: 705186 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
如何贡献我的源代码
2+
===

Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
FROM php:7.1-apache
2+
3+
MAINTAINER jayknoxqu@gmail.com
4+
5+
#设置容器时区
6+
ENV TZ Asia/Shanghai
7+
8+
#设置程序入口
9+
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
10+
11+
RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone \
12+
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
13+
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
14+
#添加阿里云的镜像源
15+
&& mv /etc/apt/sources.list /etc/apt/sources.list.bak \
16+
&& echo "deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib" >/etc/apt/sources.list \
17+
&& echo "deb http://mirrors.aliyun.com/debian-security stretch/updates main" >>/etc/apt/sources.list \
18+
&& echo "deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib" >>/etc/apt/sources.list \
19+
&& echo "deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib" >>/etc/apt/sources.list \
20+
#安装程序依赖库
21+
&& apt-get update && apt-get install -y \
22+
libfreetype6-dev \
23+
libjpeg62-turbo-dev \
24+
libpng-dev \
25+
#安装 PHP 依赖
26+
&& docker-php-ext-install pdo_mysql \
27+
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
28+
&& docker-php-ext-install -j$(nproc) gd \
29+
#删除包缓存中的所有包
30+
&& apt-get clean \
31+
&& apt-get autoclean \
32+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
33+
34+
#复制代码到PHP容器
35+
COPY . /var/www/html
36+
37+
# 开启URL重写 并且 添加目录权限
38+
RUN a2enmod rewrite \
39+
&& chmod -R 0755 /var/www/html \
40+
&& chown -R www-data:www-data /var/www/html

0 commit comments

Comments
 (0)