Make sure you have PHP and Composer installed globally on your machine
php --version
PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
with Zend OPcache v8.1.2-1ubuntu2.14, Copyright (c), by Zend Technologies
and
composer --version
Composer version 2.5.4 2023-02-15 13:10:06
Make sure Docker is running
docker --version
Docker version 24.0.6, build ed223bc
Create your sail alias by adding the following to your bash profile (e.g. .bashrc, .zshrc etc.).
alias sail='[ -f sail ] && sh sail || sh vendor/bin/sail'
Clone the project
cd ~/my-projects
git clone https://github.com/reneweiser/skhc-platform.git skhc-platform
[...]
cd skhc-platform
Install composer dependencies
composer install
Copy the example environment settings
cp .env.example .env
Change the newly created .env
file
+ DB_HOST=mysql
- DB_HOST=127.0.0.1
Start docker containers
sail up -d
Generate an app key for the project
sail artisan key:generate
Migrate the database
sail artisan migrate --seed
Install npm dependencies
sail npm install
Run the dev server
sail npm run dev