diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..727eb1893 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,61 @@ +trigger: +- main + +pool: + vmImage: ubuntu-latest + +variables: + phpVersion: 8.1 + +steps: +- script: | + sudo update-alternatives --set php /usr/bin/php$(phpVersion) + sudo update-alternatives --set phar /usr/bin/phar$(phpVersion) + sudo update-alternatives --set phpdbg /usr/bin/phpdbg$(phpVersion) + sudo update-alternatives --set php-cgi /usr/bin/php-cgi$(phpVersion) + sudo update-alternatives --set phar.phar /usr/bin/phar.phar$(phpVersion) + displayName: 'Use PHP version $(phpVersion)' + +- script: composer install --no-interaction --prefer-dist + displayName: 'composer install' + +- task: NodeTool@0 + inputs: + versionSpec: '18.x' + displayName: 'Install NodeJS' + +- task: Npm@1 + inputs: + command: 'install' + workingDir: '$(Build.SourcesDirectory)' + displayName: 'npm install' + +- script: | + sudo npm i -g npm + sudo chown -R vsts:vsts ~/.npm + sudo chown -R vsts:vsts ~/.config + npm install + npm run prod + node -v + displayName: 'Generating build assets' + + +- task: CopyFiles@2 + inputs: + SourceFolder: '$(Build.SourcesDirectory)' + Contents: | + **/** + !**/node_modules/** + !**/.git/** + !**/storage/** + TargetFolder: '$(Build.ArtifactStagingDirectory)' + CleanTargetFolder: true + OverWrite: true + displayName: 'Copy files to publish directory' + +- task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' + StoreAsTar: true \ No newline at end of file diff --git a/config/database.php b/config/database.php index 4d8a557d4..80d49b137 100644 --- a/config/database.php +++ b/config/database.php @@ -49,7 +49,7 @@ 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), + 'username' => env('DB_USERNAME', 'adminrmp'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8mb4', diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 000000000..97921a98e --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["resources/js/*"] + } + }, + "exclude": ["node_modules", "public"] +}