Laravel project sample
- PHP >= 8.1
- node >= 16.1.0 (for
npm
) - postgres >= 12
or use
- docker
- docker compose
[email protected]
/password
composer install
npm install
npm run dev
php artisan migrate
php artisan db:seed (if you need)
php artisan serve
- 建立環境:
docker-compose up -d --build
docker-compose exec app sh -c "composer install"
docker-compose exec app sh -c "php artisan migrate"
docker-compose exec app sh -c 'php artisan db:seed'
docker-compose exec app sh -c 'php artisan storage:link'
docker-compose exec node sh -c "npm install && npm run dev"
- develop in watch mode:
docker-compose up -d
docker-compose exec node sh -c "npm run watch"
- build pages in dev:
docker-compose up -d
docker-compose exec node sh -c "npm run dev"
- install js packages: ( or just run
npm install
)
docker-compose exec node sh -c "npm install"
- 更新 database:
docker-compose exec app sh -c "php artisan migrate"
- 建立假資料
docker-compose exec app sh -c "php artisan db:seed"
- 清除 docker
docker-compose down -v
- 建立環境:
make build-local
- develop in watch mode:
make run-watch
- build pages in dev:
make run-dev
- install js packages: ( or just run
npm install
)
make npm-install
- 更新 database:
make run-migrate
- 建立假資料
make run-seed
- 清除 docker
make stop-dev