forked from meolu/walle-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into departure-rsync
# Conflicts: # controllers/TaskController.php
- Loading branch information
Showing
9 changed files
with
110 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/vendor | ||
/config/local.php | ||
tests/_output/* | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM php:apache | ||
|
||
RUN apt-get update && apt-get install -y gettext-base libmcrypt-dev libicu-dev \ | ||
zlib1g-dev unzip git subversion ssh ansible && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN docker-php-ext-install bcmath intl mbstring mcrypt mysqli opcache pdo_mysql | ||
RUN a2enmod rewrite | ||
|
||
COPY ./ /opt/walle-web | ||
COPY docker/php.ini /usr/local/etc/php/conf.d/walle-web.ini | ||
COPY docker/apache2.conf /etc/apache2/apache2.conf | ||
COPY docker/entrypoint.sh /entrypoint.sh | ||
|
||
WORKDIR /opt/walle-web | ||
RUN curl -sS https://getcomposer.org/installer | php \ | ||
&& mv composer.phar /usr/local/bin/composer \ | ||
&& chmod +x /usr/local/bin/composer | ||
RUN composer install --prefer-dist --no-dev --optimize-autoloader -vvvv | ||
RUN chmod +x /entrypoint.sh && \ | ||
chown -R www-data:www-data /opt/walle-web | ||
|
||
EXPOSE 80 | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["apache2-foreground"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,27 +12,28 @@ | |
return [ | ||
'components' => [ | ||
'db' => [ | ||
'dsn' => 'mysql:host=127.0.0.1;dbname=walle', | ||
'username' => 'root', | ||
'password' => '', | ||
'dsn' => isset($_ENV['WALLE_DB_DSN']) ? $_ENV['WALLE_DB_DSN'] : 'mysql:host=127.0.0.1;dbname=walle', | ||
'username' => isset($_ENV['WALLE_DB_USER']) ? $_ENV['WALLE_DB_USER'] : 'root', | ||
'password' => isset($_ENV['WALLE_DB_PASS']) ? $_ENV['WALLE_DB_PASS'] : '', | ||
], | ||
'mail' => [ | ||
'transport' => [ | ||
'host' => 'smtp.exmail.qq.com', # smtp 发件地址 | ||
'username' => '[email protected]', # smtp 发件用户名 | ||
'password' => 'K84erUuxg1bHqrfD', # smtp 发件人的密码 | ||
'port' => 25, # smtp 端口 | ||
'encryption' => 'tls', # smtp 协议 | ||
'host' => isset($_ENV['WALLE_MAIL_HOST']) ? $_ENV['WALLE_MAIL_HOST'] : 'smtp.exmail.qq.com', # smtp 发件地址 | ||
'username' => isset($_ENV['WALLE_MAIL_USER']) ? $_ENV['WALLE_MAIL_USER'] : '[email protected]', # smtp 发件用户名 | ||
'password' => isset($_ENV['WALLE_MAIL_PASS']) ? $_ENV['WALLE_MAIL_PASS'] : 'K84erUuxg1bHqrfD', # smtp 发件人的密码 | ||
'port' => isset($_ENV['WALLE_MAIL_PORT']) ? $_ENV['WALLE_MAIL_PORT'] : 25, # smtp 端口 | ||
'encryption' => isset($_ENV['WALLE_MAIL_ENCRYPTION']) ? $_ENV['WALLE_MAIL_ENCRYPTION'] : 'tls', # smtp 协议 | ||
], | ||
'messageConfig' => [ | ||
'charset' => 'UTF-8', | ||
'from' => ['[email protected]' => '花满树出品'], # smtp 发件用户名(须与mail.transport.username一致) | ||
'from' => [ | ||
(isset($_ENV['WALLE_MAIL_EMAIL']) ? $_ENV['WALLE_MAIL_EMAIL'] : '[email protected]') => (isset($_ENV['WALLE_MAIL_NAME']) ? $_ENV['WALLE_MAIL_NAME'] : '花满树出品'), | ||
], # smtp 发件用户名(须与mail.transport.username一致) | ||
], | ||
], | ||
'request' => [ | ||
'cookieValidationKey' => 'PdXWDAfV5-gPJJWRar5sEN71DN0JcDRV', | ||
], | ||
], | ||
'language' => 'zh-CN', // zh-CN => 中文, en => English | ||
'language' => isset($_ENV['WALLE_LANGUAGE']) ? $_ENV['WALLE_LANGUAGE'] : 'zh-CN', // zh-CN => 中文, en => English | ||
]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Mutex file:/var/lock/apache2 default | ||
PidFile /var/run/apache2/apache2.pid | ||
Timeout 600 | ||
KeepAlive On | ||
MaxKeepAliveRequests 100 | ||
KeepAliveTimeout 75 | ||
User www-data | ||
Group www-data | ||
HostnameLookups Off | ||
ErrorLog /proc/self/fd/2 | ||
LogLevel warn | ||
|
||
IncludeOptional mods-enabled/*.load | ||
IncludeOptional mods-enabled/*.conf | ||
|
||
Listen 80 | ||
|
||
<Directory /> | ||
Options FollowSymLinks | ||
AllowOverride None | ||
Require all denied | ||
</Directory> | ||
|
||
<Directory /opt/walle-web/web/> | ||
AllowOverride All | ||
Require all granted | ||
</Directory> | ||
|
||
DocumentRoot /opt/walle-web/web | ||
|
||
AccessFileName .htaccess | ||
<FilesMatch "^\.ht"> | ||
Require all denied | ||
</FilesMatch> | ||
|
||
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined | ||
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined | ||
LogFormat "%h %l %u %t \"%r\" %>s %O" common | ||
LogFormat "%{Referer}i -> %U" referer | ||
LogFormat "%{User-agent}i" agent | ||
|
||
CustomLog /proc/self/fd/1 combined | ||
|
||
<FilesMatch \.php$> | ||
SetHandler application/x-httpd-php | ||
</FilesMatch> | ||
|
||
DirectoryIndex index.php index.html | ||
|
||
IncludeOptional conf-enabled/*.conf | ||
IncludeOptional sites-enabled/*.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
/opt/walle-web/yii walle/setup --interactive=0 | ||
|
||
exec $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[PHP] | ||
display_errors = On | ||
short_open_tag = Off | ||
max_execution_time = 600 | ||
|
||
[Date] | ||
date.timezone = Asia/Shanghai |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters