Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Getting started

Katja Durrani edited this page Apr 1, 2020 · 19 revisions

Getting started

These are some instructions on how to get set up. We will use Laradock in this case. If you just need instructions how to get Laravel and the React app running, you can skip the first part, and start from installing Laravel with composer install.

To use Laradock, make sure you have Docker and Docker-compose installed.

We are going to follow the instructions on the Laradock site here (single new project): https://laradock.io/getting-started/#A2

So you do git clone https://github.com/laradock/laradock.git, which creates a laradock directory. Staying in the same directory, clone the repo for the app: git clone https://github.com/CodeHubOrg/codehub-mentorships After this, you will have laradock and codehub-mentorships subdirectories.

Cd into the laradock directory and copy the env-example file to .env:

cd laradock
cp env-example .env

In the .env file, you add the path to the project directory at the top:

APP_CODE_PATH_HOST=../codehub-mentorships/

Still inside the laradock directory, start up the containers with

docker-compose up -d nginx mysql

Enter the workspace container (this container has access to the files from the project repo):

docker-compose exec workspace bash

Install Laravel with

composer install

Open another terminal or tab, and cd into your project directory; copy .env.example to .env:

cd ..
cd codehub-mentorships
cp .env-exmaple .env

Once you have an .env file in place, you can generate a key for the Laravel app, which will automatically be written to that file. Go back to your workspace container and run:

php artisan key:generate
Clone this wiki locally