Commit ffe32682 authored by Tobias Munk's avatar Tobias Munk

fixed paths

parent 2fc6666c
......@@ -3,13 +3,15 @@ FROM yiisoftware/yii2-php:7.2-apache
WORKDIR /app
ADD composer.lock composer.json /app/
RUN composer install --prefer-dist --optimize-autoloader
RUN composer install --prefer-dist --optimize-autoloader --no-dev && \
composer clear-cache
ADD yii /app/
ADD ./config /app/config
ADD ./web /app/web/
ADD ./src /app/src/
RUN cp src/app.env-dist src/app.env
ADD ./config /app/config
RUN cp config/app.env-dist config/app.env
RUN mkdir -p runtime web/assets && \
chmod -R 775 runtime web/assets && \
......
......@@ -9,13 +9,6 @@
* file that was distributed with this source code.
*/
// Define application aliases
Yii::setAlias('@app', dirname(__DIR__).'/../src');
Yii::setAlias('@root', '..');
Yii::setAlias('@runtime', '@root/runtime');
Yii::setAlias('@web', '@root/web');
Yii::setAlias('@webroot', '/');
// Load $merge configuration files
$applicationType = php_sapi_name() == 'cli' ? 'console' : 'web';
$env = YII_ENV;
......
......@@ -4,7 +4,7 @@
$rootPath = __DIR__.'/../..';
require($rootPath.'/vendor/autoload.php');
require($rootPath.'/src/config/env.php');
require($rootPath.'/config/env.php');
if (getenv('YII_ENV') !== 'test') {
echo "Error: YII_ENV must be set to 'test'\n";
......
......@@ -15,7 +15,7 @@ $_SERVER['HOST_NAME'] = 'web';
$applicationType = 'web';
return yii\helpers\ArrayHelper::merge(
require(__DIR__ . '/../../../src/config/main.php'),
require(__DIR__ . '/../../../config/main.php'),
[
'components' => [
'request' => [
......
This diff is collapsed.
......@@ -15,13 +15,13 @@ defined('STDIN') or define('STDIN', fopen('php://stdin', 'r'));
defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w'));
require(__DIR__ . '/vendor/autoload.php');
require(__DIR__ . '/src/config/env.php');
require(__DIR__ . '/config/env.php');
defined('YII_DEBUG') or define('YII_DEBUG', (boolean)getenv('YII_DEBUG'));
defined('YII_ENV') or define('YII_ENV', getenv('YII_ENV'));
require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
$config = require(__DIR__ . '/src/config/main.php');
$config = require(__DIR__ . '/config/main.php');
$application = new yii\console\Application($config);
$exitCode = $application->run();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment