mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Laravel Vapor Initial Commit
This commit is contained in:
@@ -27,3 +27,6 @@ package-lock.json
|
||||
public/*
|
||||
/public/*
|
||||
storage/framework/laravel-excel/*
|
||||
.vapor/
|
||||
.env.production
|
||||
.env.staging
|
||||
|
||||
+10
-111
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM laravelphp/vapor:php82
|
||||
|
||||
COPY . /var/task
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB |
@@ -3,9 +3,9 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row no-margin">
|
||||
<div class="col p-l-0 p-t-20 p-b-20 sm-text-center">
|
||||
<small class="small no-margin pull-left sm-pull-reset all-caps fs-10 muted" style=" letter-spacing: 1px; ">Copyright © {{ date('Y'); }} CIEF IZYIM. All rights reserved.</small>
|
||||
<small class="small no-margin pull-left sm-pull-reset all-caps fs-10 muted" style=" letter-spacing: 1px; ">Copyright © {{ date('Y'); }} CIEF IZYIM. All rights reserved. Powered by Laravel Vapor</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END COPYRIGHT -->
|
||||
<!-- END COPYRIGHT -->
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
FROM laravelphp/vapor:php82
|
||||
|
||||
COPY . /var/task
|
||||
@@ -0,0 +1,17 @@
|
||||
id: 46567
|
||||
name: shipping-portal
|
||||
separate-vendor: true
|
||||
environments:
|
||||
production:
|
||||
memory: 1024
|
||||
cli-memory: 512
|
||||
database: vapor-laravel-poc-db
|
||||
runtime: 'docker'
|
||||
build:
|
||||
- 'npm install'
|
||||
- 'gulp build'
|
||||
- 'rm -rf node_modules'
|
||||
- 'composer install --no-dev'
|
||||
- 'php artisan event:cache'
|
||||
deploy:
|
||||
- 'php artisan migrate --force'
|
||||
Reference in New Issue
Block a user