Skip to content

Rename project, Docker setup docs, Improvements #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
"name": "PrimeVue Inertia",
"dockerComposeFile": [
"../docker-compose.yml"
"../docker-compose.local.yml"
],
"service": "primevue_inertia",
"service": "laravel",
"workspaceFolder": "/var/www/html",
"customizations": {
"vscode": {
Expand All @@ -21,6 +21,7 @@
"streetsidesoftware.code-spell-checker",
"hollowtree.vue-snippets",
"Vue.volar",
"bradlc.vscode-tailwindcss",
"shd101wyy.markdown-preview-enhanced"
],
"settings": {}
Expand Down
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync

CACHE_STORE=database
CACHE_STORE=file
CACHE_PREFIX=

MEMCACHED_HOST=127.0.0.1
Expand Down Expand Up @@ -66,6 +66,6 @@ VITE_APP_NAME="${APP_NAME}"
WWWGROUP=1000
WWWUSER=1000

APP_PORT=
APP_PORT=8000
VITE_PORT=5173
VITE_HOST_DOMAIN=primevue-breeze-inertia.localhost
FORWARD_DB_PORT=3306
89 changes: 38 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,41 @@
# Laravel Breeze & PrimeVue
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.

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

## Installation
1. Clone the repo (or download the zip)
```
git clone https://github.com/connorabbas/primevue-breeze-inertia.git
```

2. Step into the project directory
```
cd ./primevue-breeze-inertia
```

3. Install the framework and other packages
```
composer install
```

3. Setup `.env` file

Windows
```
copy .env.example .env
```
Unix/Linux/MacOS
```
cp .env.example .env
```

4. Generate the app key
```
php artisan key:generate
```

5. Migrate database tables (after `.env` and database related config setup)
```
php artisan migrate
```

6. Install npm packages
```
npm install
```

7. Start the Vite dev server
```
npm run dev
```
# Laravel Inertia & PrimeVue Starter Kit
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.

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

## Usage with Docker
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.

### Setup
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).

2. Step into the directory containing the new compose file, and spin up the Traefik container:
```
docker compose up -d
```
3. Update Laravel app `.env`
```env
# Use any desired domain ending with .localhost
# Match with value used in docker-compose.local.yml
APP_URL=http://primevue-inertia.localhost

DB_CONNECTION=mariadb
DB_HOST=mariadb # service name from container
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=docker_mariadb
DB_PASSWORD=password

# Update as needed for running multiple projects
APP_PORT=8000
VITE_PORT=5173
FORWARD_DB_PORT=3306
```
3. Build the Laravel app container:
- 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.

### Additional configuration
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.

## Theme
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.
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/breeze": "^2.1",
"laravel/pint": "^1.13",
"laravel/sail": "^1.31",
"mockery/mockery": "^1.6",
Expand Down
Loading