Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit42b319a

Browse files
committed
Adds default vite port mapping, adds info about compiling assets with vite or laravel-mix
1 parent1c9105c commit42b319a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

‎README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,26 @@ volumes:
5858

5959
While I originally created this template for local development, it's robust enough to be used in basic Laravel application deployments. The biggest recommendation would be to ensure that HTTPS is enabled by making additions to the`nginx/default.conf` file and utilizing something like[Let's Encrypt](https://hub.docker.com/r/linuxserver/letsencrypt) to produce an SSL certificate.
6060

61+
##Compiling Assets
62+
63+
This configuration should be able to compile assets with both[laravel mix](https://laravel-mix.com/) and[vite](https://vitejs.dev/). In order to get started, you first need to add` --host 0.0.0.0` after the end of your relevant dev command in`package.json`. So for example, with a Laravel project using Vite, you should see:
64+
65+
```json
66+
"scripts": {
67+
"dev":"vite --host 0.0.0.0",
68+
"build":"vite build"
69+
},
70+
```
71+
72+
Then, run the following commands to install your dependencies and start the dev server:
73+
74+
-`docker-compose run --rm npm install`
75+
-`docker-compose run --rm --service-ports npm run dev`
76+
77+
After that, you should be able to use`@vite` directives to enable hot-module reloading on your local Laravel application.
78+
79+
Want to build for production? Simply run`docker-compose run --rm npm run build`.
80+
6181
##MailHog
6282

6383
The current version of Laravel (9 as of today) uses MailHog as the default application for testing email sending and general SMTP work during local development. Using the provided Docker Hub image, getting an instance set up and ready is simple and straight-forward. The service is included in the`docker-compose.yml` file, and spins up alongside the webserver and database services.

‎docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ services:
8282
ports:
8383
-3000:3000
8484
-3001:3001
85+
-5173:5173
8586
working_dir:/var/www/html
8687
entrypoint:[ 'npm' ]
8788
networks:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp