1
0
mirror of https://github.com/newnius/YAO-Dockerfiles.git synced 2025-06-06 07:51:54 +00:00

update yao-portal

This commit is contained in:
Newnius 2019-12-04 18:52:14 +08:00
parent f79ab58e5d
commit 610ee98efb
3 changed files with 2 additions and 65 deletions

View File

@ -1,6 +1,6 @@
FROM newnius/php:7.3
MAINTAINER Newnius <docker@newnius.com>
MAINTAINER Newnius <newnius.cn@gmail.com>
RUN apt update && \
apt install -y git vim httpie && \
@ -8,8 +8,6 @@ RUN apt update && \
RUN git clone https://github.com/newnius/YAO-portal.git /var/www/html/
ADD config/config.inc.php /var/www/html/
ADD bootstrap.sh /etc/
CMD /etc/bootstrap.sh

View File

@ -1,23 +1,14 @@
#!/bin/bash
if [[ -d /config/ ]]; then
if [[ ! -f /config/config.js ]]; then
cp /var/www/html/static/config.js /config/config.js
fi
if [[ ! -f /config/config.inc.php ]]; then
cp /var/www/html/config.inc.php /config/config.inc.php
fi
fi
if [[ -f /config/config.js ]]; then
rm /var/www/html/static/config.js
ln -s /config/config.js /var/www/html/static/config.js
fi
if [[ -f /config/config.inc.php ]]; then
rm /var/www/html/config.inc.php
ln -s /config/config.inc.php /var/www/html/config.inc.php
fi
apache2-foreground
apache2-foreground

View File

@ -1,52 +0,0 @@
<?php
define('YAO_VERSION', '0.2.1');
/* Custom */
define('YAO_SCHEDULER_ADDR', 'http://yao-scheduler:8080');
/* Mysql */
/* It is not recommended to use `root` in production environment */
define('DB_HOST', 'mysql');
define('DB_PORT', 3306);
define('DB_NAME', 'yao');
define('DB_USER', 'root');
define('DB_PASSWORD', '123456');
define('DB_SHOW_ERROR', false); // set to true to see detailed Mysql errors __only__ for debug purpose
/* Redis */
/* Make sure that your Redis only listens to Intranet */
define('REDIS_SCHEME', 'tcp');
define('REDIS_HOST', 'redis');
define('REDIS_PORT', 6379);
define('REDIS_SHOW_ERROR', true); // set to true to see detailed Redis errors __only__ for debug purpose
/* Site */
define('BASE_URL', 'http://127.0.0.1'); // make absolute url for SEO and avoid hijack, no '/' at the end
define('WEB_ROOT', __DIR__);
define('FEEDBACK_EMAIL', 'support@newnius.com');
/* Auth */
define('AUTH_CODE_TIMEOUT', 300); // 5 min
define('AUTH_TOKEN_TIMEOUT', 604800); // 7 day
/* Session */
define('ENABLE_MULTIPLE_LOGIN', true);
define('BIND_SESSION_WITH_IP', false); // current session will be logged when ip changes
define('SESSION_TIME_OUT', 1800);// 30 minutes 30*60=1800
define('ENABLE_COOKIE', true);
/* Rate Limit */
define('ENABLE_RATE_LIMIT', false);
define('RATE_LIMIT_PREFIX', 'rl');
/* OAuth */
/* The default conf is only usable when this runs on localhost */
define('OAUTH_SITE', 'https://quickauth.newnius.com');
define('OAUTH_CLIENT_ID', 'XgaII6NxeE08LtKB');
define('OAUTH_CLIENT_SECRET', 'L9hdi4dQToM0GsDLtcYYQ3k4ZDEjuGVOtPS3nOVKlo6cxLcVjH9TqvmTBiHAgLp2');
header("content-type:text/html; charset=utf-8");
date_default_timezone_set('Asia/Shanghai');