Skip to content

Commit f17d31e

Browse files
authored
Merge pull request alexjustesen#27 from svenvg93/update_env_setup
Update Development Environment
2 parents 1af904a + 76f28d1 commit f17d31e

File tree

1 file changed

+40
-9
lines changed

1 file changed

+40
-9
lines changed

contributing/development-environment.md

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,18 @@ Next we need to make a copy of `.env.example`, the environment file is what Lara
3535
cp .env.example .env
3636
```
3737

38-
You'll also want to fill in a few `DB_` variables here as well which will control which database Laravel will use. I've included MySQL as the default database for the development environment.
38+
You will copy and fill in the following Environment Variables
3939

4040
```
41-
DB_CONNECTION=mysql
42-
DB_HOST=mysql
43-
DB_PORT=3306
44-
DB_DATABASE=speedtest_tracker
45-
DB_USERNAME=sail
46-
DB_PASSWORD=password
41+
APP_NAME="Speedtest Tracker"
42+
APP_ENV=local
43+
APP_KEY=
44+
APP_DEBUG=false
45+
APP_TIMEZONE=UTC
4746
```
47+
{% hint style="info" %}
48+
Generate the APP_KEY at https://speedtest-tracker.dev
49+
{% endhint %}
4850

4951
#### 3. Install Composer dependencies
5052

@@ -55,7 +57,7 @@ docker run --rm \
5557
-u "$(id -u):$(id -g)" \
5658
-v "$(pwd):/var/www/html" \
5759
-w /var/www/html \
58-
laravelsail/php82-composer:latest \
60+
laravelsail/php83-composer:latest \
5961
composer install --ignore-platform-reqs
6062
```
6163

@@ -81,7 +83,36 @@ To start up the environment we can now use the Sail binary that is included with
8183
sail up -d
8284
```
8385

84-
#### 6. Installing the application
86+
#### 6. Create the database
87+
88+
To start up the environment we need to make a database
89+
90+
```bash
91+
touch database/database.sqlite
92+
```
93+
94+
As well need to make the needed tables etc in the database.
95+
96+
```bash
97+
./vendor/bin/sail artisan migrate:fresh --force
98+
99+
# or if you have a Sail alias setup...
100+
sail artisan migrate:fresh --force
101+
```
102+
103+
#### 7. Installing NPM assets
104+
105+
We will need to install the needed NPM assets
106+
107+
```bash
108+
./vendor/bin/sail npm install && ./vendor/bin/sail npm run build
109+
110+
# or if you have a Sail alias setup...
111+
sail npm install && sail npm run build
112+
113+
```
114+
115+
#### 8. Installing the application
85116

86117
Once the environment is setup you can install a fresh version of the application by running the following command. Keep in mind this WILL refresh the entire database.
87118

0 commit comments

Comments
 (0)