-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
30 lines (29 loc) · 911 Bytes
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
version: 0.2
phases:
install:
runtime-versions:
php: 8.2
pre_build:
commands:
- echo Prepare Laravel Sail Environment
- docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/var/www/html" -w /var/www/html laravelsail/php82-composer:latest composer install --ignore-platform-reqs
- echo Copy .env
- php -r "file_exists('.env') || copy('.env.ci', '.env');"
build:
commands:
- echo Start Laravel Sail
- ./vendor/bin/sail up -d
- echo Change permission
- sudo chmod -R 777 . /var/lib/mysql
- echo Generate key
- ./vendor/bin/sail artisan key:generate
- echo Migrate
- ./vendor/bin/sail artisan migrate
- echo Npm build
- ./vendor/bin/sail npm run build
post_build:
commands:
- echo Test
- ./vendor/bin/sail test
- echo Larastan
- ./vendor/bin/sail artisan larastan --without-tty