-
Notifications
You must be signed in to change notification settings - Fork 1
MacOS
The following steps are completed using the Terminal application. All required software libraries are available from the Brew package manager.
Before we start
brew update
brew install --cask docker
brew install php
composer global require laravel/valet
valet install
Check valet installed correctly by pinging foobar.test and verifying 127.0.0.1 responds. Use Control + C to cancel ping.
ping foobar.test
brew install node
brew install corepack
npm install -g @vue/cli
Launch Docker through through Spotlight or CLI with the command:
docker.app
The MySQL server will be initiated in a Docker container. Install the official MySQL Docker image:
docker pull mysql
Create the MySQL instance and set the master password:
docker run --name osp -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql
Check that the MySQL image in running by running,
docker ps
Naviagate to where you want to clone the repository (Do not use a directory which is backed up by iCloud)
git clone [email protected]:dfo-osdt/osp.git
Park Valet in the same directory which contains /osp
valet park
Cd into /osp to set up the environment file
cd osp/
cp .env.example .env
Open .env in your text editor of choice. Change the following variables to be the same as below:
APP_URL=http://osp.test
FRONTEND_URL=http://osp.test
DB_CONNECTION=mysql
DB_HOST=0.0.0.0
DB_PORT=3306
DB_DATABASE=osp
DB_USERNAME=root
DB_PASSWORD=password
CACHE_DRIVER=array
Return to the terminal and run the following commands to initialize the project
composer install
pnpm install
php artisan key:generate
php artisan migrate:fresh
php artisan test
Seed the database with dummy users and rerun the test
php artisan db:seed
php artisan test --parallel
Build pnpm
pnpm build
At this point the application should be running. Begin using the application by navigating to osp.test. Test the login server with the credentials:
- [email protected]
- password
After pulling changes from the main repository you must update composer and pnpm with the following commands
composer install
pnpm install
pnpm build
Verify that your local copy is still functional with a test
php artisan test --parallel
Launch Docker
open -a docker
Start MySQL Container
docker start osp
Check active containers
docker ps
Stop MySQL Container
docker stop osp