diff --git a/.gitignore b/.gitignore index 96f0a5e2..e5a28985 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ package-lock.json public/* /public/* storage/framework/laravel-excel/* +.vapor/ +.env.production +.env.staging diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index daad27fa..660e1df6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,119 +1,18 @@ -image: php:7.4 +image: lorisleiva/laravel-docker:7.4 stages: - - service_build - - node - - building_assets - - database - - unit_test - - acceptance_test - - code_quality - -# Variables -variables: - MYSQL_ROOT_PASSWORD: root - MYSQL_USER: mysql_password - MYSQL_PASSWORD: mysql_password - MYSQL_DATABASE: shpping_portal - DB_HOST: mysql - - -before_script: - - apt-get update -yqq - - apt-get install -yqq - - apt-get install -y libonig-dev - - apt-get install -y libxml2-dev - - apt-get install -y libzip-dev - - apt-get install -y libgd-dev - - apt-get install -y libgd-dev - -# Install PDO MySQL extension - - docker-php-ext-install pdo_mysql - - #install php dependencies - - docker-php-ext-install mbstring xml zip gd - - # Install composer package manager - - curl --location --output /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar - - chmod +x /usr/local/bin/composer - - # Install MySQL client - - apt-get install -y default-mysql-client - - #install node js - - apt-get update && apt-get install -y nodejs npm - - #install gulp Js - - npm install -g gulp-cli - + - deploy #jobs - -#buld the backend -composer_php: - stage: service_build +#deploy +deploy: + stage: deploy script: + - npm install + - gulp build - composer install - - cp .env.example .env - - php artisan key:generate - rules: - - if: '$CI_COMMIT_BRANCH =~ /.*/' - -#build the UI -#node installation -npm: - stage: node - script: - - npm install # Install npm dependencies - rules: - - if: '$CI_COMMIT_BRANCH =~ /.*/' - -#building assets -building_assets: - stage: building_assets - # dependencies: - # - npm - script: - - npm install # Install npm dependencies - - gulp build # Build assets - rules: - - if: '$CI_COMMIT_BRANCH =~ /.*/' - -#mysql -database: - stage: database - services: - - name: mysql:8.0 - command: [ "--default-authentication-plugin=mysql_native_password" ] - #dependencies: - # - composer_php - script: - - composer install - - cp .env.example .env - - php artisan key:generate - - php artisan migrate:fresh - - php artisan db:seed - rules: - - if: '$CI_COMMIT_BRANCH =~ /.*/' - -#mysql -unit_test: - stage: unit_test - services: - - name: mysql:8.0 - command: [ "--default-authentication-plugin=mysql_native_password" ] - #dependencies: - # - database - script: - - npm install # Install npm dependencies - - gulp build # Build assets - - composer install - - cp .env.example .env - - php artisan key:generate - - php artisan migrate:fresh - - php artisan db:seed - - php artisan test - rules: - - if: '$CI_COMMIT_BRANCH =~ /.*/' + - vapor deploy production --message="$CI_COMMIT_MESSAGE" + only: + - test diff --git a/composer.json b/composer.json index e2b684e5..40d6e7f3 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,8 @@ "laravel/framework": "^8.40", "laravel/legacy-factories": "^1.3", "laravel/tinker": "^2.5", + "laravel/vapor-cli": "^1.55", + "laravel/vapor-core": "^2.30", "league/fractal": "^0.20.1", "maatwebsite/excel": "^3.1", "rinvex/countries": "^6.1", diff --git a/production.Dockerfile b/production.Dockerfile new file mode 100644 index 00000000..c1b06c0b --- /dev/null +++ b/production.Dockerfile @@ -0,0 +1,3 @@ +FROM laravelphp/vapor:php82 + +COPY . /var/task \ No newline at end of file diff --git a/resources/assets/images/—Pngtree—2019 chinese new year lantern_951828.jpg b/resources/assets/images/—Pngtree—2019 chinese new year lantern_951828.jpg deleted file mode 100644 index dd7ceda3..00000000 Binary files a/resources/assets/images/—Pngtree—2019 chinese new year lantern_951828.jpg and /dev/null differ diff --git a/resources/views/partials/footer.blade.php b/resources/views/partials/footer.blade.php index 459488fb..1cff8dc2 100644 --- a/resources/views/partials/footer.blade.php +++ b/resources/views/partials/footer.blade.php @@ -3,9 +3,9 @@