Skip to content

Commit 384b0ac

Browse files
committed
docker setup cleanup, db included, drop breeze from naming
1 parent 1ed8a78 commit 384b0ac

File tree

15 files changed

+1293
-652
lines changed

15 files changed

+1293
-652
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{
33
"name": "PrimeVue Inertia",
44
"dockerComposeFile": [
5-
"../docker-compose.yml"
5+
"../docker-compose.local.yml"
66
],
7-
"service": "primevue_inertia",
7+
"service": "laravel",
88
"workspaceFolder": "/var/www/html",
99
"customizations": {
1010
"vscode": {
@@ -21,6 +21,7 @@
2121
"streetsidesoftware.code-spell-checker",
2222
"hollowtree.vue-snippets",
2323
"Vue.volar",
24+
"bradlc.vscode-tailwindcss",
2425
"shd101wyy.markdown-preview-enhanced"
2526
],
2627
"settings": {}

.env.example

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ BROADCAST_CONNECTION=log
3636
FILESYSTEM_DISK=local
3737
QUEUE_CONNECTION=sync
3838

39-
CACHE_STORE=database
39+
CACHE_STORE=file
4040
CACHE_PREFIX=
4141

4242
MEMCACHED_HOST=127.0.0.1
@@ -66,6 +66,6 @@ VITE_APP_NAME="${APP_NAME}"
6666
WWWGROUP=1000
6767
WWWUSER=1000
6868

69-
APP_PORT=
69+
APP_PORT=8000
7070
VITE_PORT=5173
71-
VITE_HOST_DOMAIN=primevue-breeze-inertia.localhost
71+
FORWARD_DB_PORT=3306

README.md

Lines changed: 66 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,88 @@
1-
# Laravel Breeze & PrimeVue
2-
A starter kit using [Laravel Breeze](https://laravel.com/docs/master/starter-kits#laravel-breeze) with the [Intertia.js](https://inertiajs.com/) Vue option, utilizing [PrimeVue](https://primevue.org/) components.
1+
# Laravel Inertia & PrimeVue Starter Kit
2+
A basic starter kit using [Laravel](https://laravel.com/docs/master), [Intertia.js](https://inertiajs.com/), and [PrimeVue](https://primevue.org/). An equivalent to using [Laravel Breeze](https://laravel.com/docs/master/starter-kits#laravel-breeze), but with the added benefit of all the PrimeVue components at your disposal.
33

4-
Need an admin panel? [There's a branch for that.](https://github.com/connorabbas/primevue-breeze-inertia/tree/admin-panel)
4+
Need an admin panel? [There's a branch for that.](https://github.com/connorabbas/laravel-inertia-primevue/tree/feature/admin-panel)
55

66
## Installation
77
1. Clone the repo (or download the zip)
8-
```
9-
git clone https://github.com/connorabbas/primevue-breeze-inertia.git
10-
```
8+
```
9+
git clone https://github.com/connorabbas/laravel-inertia-primevue.git
10+
```
1111
1212
2. Step into the project directory
13-
```
14-
cd ./primevue-breeze-inertia
15-
```
13+
```
14+
cd ./laravel-inertia-primevue
15+
```
1616
1717
3. Install the framework and other packages
18-
```
19-
composer install
20-
```
18+
```
19+
composer install
20+
```
2121
2222
3. Setup `.env` file
2323
24-
Windows
25-
```
26-
copy .env.example .env
27-
```
28-
Unix/Linux/MacOS
29-
```
30-
cp .env.example .env
31-
```
24+
Windows
25+
```
26+
copy .env.example .env
27+
```
28+
Unix/Linux/MacOS
29+
```
30+
cp .env.example .env
31+
```
3232
3333
4. Generate the app key
34-
```
35-
php artisan key:generate
36-
```
34+
```
35+
php artisan key:generate
36+
```
3737
3838
5. Migrate database tables (after `.env` and database related config setup)
39-
```
40-
php artisan migrate
41-
```
39+
```
40+
php artisan migrate
41+
```
4242
4343
6. Install npm packages
44-
```
45-
npm install
46-
```
44+
```
45+
npm install
46+
```
4747
4848
7. Start the Vite dev server
49-
```
50-
npm run dev
51-
```
49+
```
50+
npm run dev
51+
```
52+
53+
## Usage with Docker
54+
This starter kit is configured to use Docker Compose for local development with a few extra configuration steps. With this setup, you do not need PHP, Composer, MySQL/MariaDB, or Node.js installed on your machine to get up and running with this project.
55+
56+
### Setup
57+
1. In a new directory (outside of your Laravel project) create a `docker-compose.yml` file to create a reverse proxy container using [Traefik](https://doc.traefik.io/traefik/getting-started/quick-start/). You can reference this [example implementation](https://github.com/connorabbas/traefik-docker-compose/blob/master/docker-compose.yml).
58+
59+
2. Step into the directory containing the new compose file, and spin up the Traefik container:
60+
```
61+
docker compose up -d
62+
```
63+
3. Update Laravel app `.env`
64+
```env
65+
# Use any desired domain ending with .localhost
66+
# Match with value used in docker-compose.local.yml
67+
APP_URL=http://primevue-inertia.localhost
68+
69+
DB_CONNECTION=mariadb
70+
DB_HOST=mariadb # service name from container
71+
DB_PORT=3306
72+
DB_DATABASE=laravel
73+
DB_USERNAME=docker_mariadb
74+
DB_PASSWORD=password
75+
76+
# Update as needed for running multiple projects
77+
APP_PORT=8000
78+
VITE_PORT=5173
79+
FORWARD_DB_PORT=3306
80+
```
81+
3. Build the Laravel app container:
82+
- Either build manually with docker compose (like above), use [Laravel Sail](https://laravel.com/docs/master/sail), or build as a [VS Code Dev Container](https://code.visualstudio.com/docs/devcontainers/tutorial) using the `Dev Containers: Reopen in Container` command.
83+
84+
### Additional configuration
85+
If you wish to add additional services, or swap out MariaDB with an alternative database, you can reference the [Laravel Sail stubs](https://github.com/laravel/sail/tree/1.x/stubs) and update the `docker-compose.local.yml` file as needed.
5286
5387
## Theme
5488
This starter kit provides a light/dark mode and custom theme functionality provided by the powerful PrimeVue theming system, using styled mode and custom design token values.

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
},
1515
"require-dev": {
1616
"fakerphp/faker": "^1.23",
17-
"laravel/breeze": "^2.1",
1817
"laravel/pint": "^1.13",
1918
"laravel/sail": "^1.31",
2019
"mockery/mockery": "^1.6",

0 commit comments

Comments
 (0)