Skip to content

Commit bfe36cc

Browse files
authored
Merge pull request #48 from connorabbas/develop
Rename project, Docker setup docs, Improvements
2 parents 7ea85c3 + a933e11 commit bfe36cc

File tree

16 files changed

+1276
-685
lines changed

16 files changed

+1276
-685
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: 38 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,41 @@
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.
3-
4-
Need an admin panel? [There's a branch for that.](https://github.com/connorabbas/primevue-breeze-inertia/tree/admin-panel)
5-
6-
## Installation
7-
1. Clone the repo (or download the zip)
8-
```
9-
git clone https://github.com/connorabbas/primevue-breeze-inertia.git
10-
```
11-
12-
2. Step into the project directory
13-
```
14-
cd ./primevue-breeze-inertia
15-
```
16-
17-
3. Install the framework and other packages
18-
```
19-
composer install
20-
```
21-
22-
3. Setup `.env` file
23-
24-
Windows
25-
```
26-
copy .env.example .env
27-
```
28-
Unix/Linux/MacOS
29-
```
30-
cp .env.example .env
31-
```
32-
33-
4. Generate the app key
34-
```
35-
php artisan key:generate
36-
```
37-
38-
5. Migrate database tables (after `.env` and database related config setup)
39-
```
40-
php artisan migrate
41-
```
42-
43-
6. Install npm packages
44-
```
45-
npm install
46-
```
47-
48-
7. Start the Vite dev server
49-
```
50-
npm run dev
51-
```
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.
3+
4+
Need an admin panel? [There's a branch for that.](https://github.com/connorabbas/laravel-inertia-primevue/tree/feature/admin-panel)
5+
6+
## Usage with Docker
7+
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.
8+
9+
### Setup
10+
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).
11+
12+
2. Step into the directory containing the new compose file, and spin up the Traefik container:
13+
```
14+
docker compose up -d
15+
```
16+
3. Update Laravel app `.env`
17+
```env
18+
# Use any desired domain ending with .localhost
19+
# Match with value used in docker-compose.local.yml
20+
APP_URL=http://primevue-inertia.localhost
21+
22+
DB_CONNECTION=mariadb
23+
DB_HOST=mariadb # service name from container
24+
DB_PORT=3306
25+
DB_DATABASE=laravel
26+
DB_USERNAME=docker_mariadb
27+
DB_PASSWORD=password
28+
29+
# Update as needed for running multiple projects
30+
APP_PORT=8000
31+
VITE_PORT=5173
32+
FORWARD_DB_PORT=3306
33+
```
34+
3. Build the Laravel app container:
35+
- 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.
36+
37+
### Additional configuration
38+
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.
5239
5340
## Theme
5441
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)