Skip to content

angus-websites/passworld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Passworld

A website for learning about cyber security

Installation

clone the repository from github

git clone [email protected]:angus-websites/passworld.git

CD into the passworld directory

Setup for dev (sail)

if you are developing on another dev machine and plan to use SAIL you can execute the following commands to use docker to install dependencies...

Note, if you are using Apple CPU, you will need to specify the platform in the Dockerfile

mysql:
    platform: linux/amd64
docker run --rm \
    -u "$(id -u):$(id -g)" \
    -v $(pwd):/var/www/html \
    -w /var/www/html \
    laravelsail/php81-composer:latest \
    composer install --ignore-platform-reqs

more information about this command can be found here

Make sure you create an ENV file or simple copy the example one provided and put the contents in .env and create a database password etc

Run sail

./vendor/bin/sail up

then install the modules

./vendor/bin/sail npm install
./vendor/bin/sail npm run dev

Generate an app encryption key

./vendor/bin/sail php artisan key:generate

Migrate the database

./vendor/bin/sail php artisan migrate

Seed the database tables

./vendor/bin/sail php artisan db:seed

Setup for Production server

Ensure you have the right requirements on your server / computer to run Laravel, if not you can install them (ubuntu)

sudo apt install php libapache2-mod-php php-mbstring php-cli php-bcmath php-json php-xml php-zip php-pdo php-common php-tokenizer php-mysql

Next ensure you have composer installed, if not you can run the following commands...

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar  /usr/local/bin/composer
sudo chmod +x   /usr/local/bin/composer

Install dependencies using composer

composer install

Install NPM dependencies

if you do not have NPM installed on your machine execute the following (ubuntu)

sudo apt-get install nodejs npm

then install the modules

npm install
npm run dev

Make sure you create an ENV file or simple copy the example one provided and put the contents in .env and create a database password etc

Generate an app encryption key

php artisan key:generate

Migrate the database

php artisan migrate

Seed the database tables

php artisan db:seed