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

Commit0c9ee37

Browse files
committed
Adds MailHog as a service, includes it in site by default
1 parent717ef5d commit0c9ee37

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

‎README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ After that completes, follow the steps from the [src/README.md](src/README.md) f
1212

1313
Bringing up the Docker Compose network with`site` instead of just using`up`, ensures that only our site's containers are brought up at the start, instead of all of the command containers as well. The following are built for our web server, with their exposed ports detailed:
1414

15-
-**nginx** -`:8080`
15+
-**nginx** -`:80`
1616
-**mysql** -`:3306`
1717
-**php** -`:9000`
18+
-**mailhog** -`:8025`
1819

1920
Three additional containers are included that handle Composer, NPM, and Artisan commands*without* having to have these platforms installed on your local computer. Use the following command examples from your project root, modifying them to fit your particular use case.
2021

@@ -32,4 +33,10 @@ By default, whenever you bring down the Docker network, your MySQL data will be
3233
```
3334
volumes:
3435
- ./mysql:/var/lib/mysql
35-
```
36+
```
37+
38+
##MailHog
39+
40+
The current version of Laravel (8 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.
41+
42+
To see the dashboard and view any emails coming through the system, visit[localhost:8025](http://localhost:8025) after running`docker-compose up -d site`.

‎docker-compose.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ services:
1010
dockerfile:nginx.dockerfile
1111
container_name:nginx
1212
ports:
13-
-"8080:80"
13+
-80:80
1414
volumes:
1515
-./src:/var/www/html:delegated
1616
depends_on:
1717
-php
1818
-mysql
19+
-mailhog
1920
networks:
2021
-laravel
2122

@@ -25,7 +26,7 @@ services:
2526
restart:unless-stopped
2627
tty:true
2728
ports:
28-
-"3306:3306"
29+
-3306:3306
2930
environment:
3031
MYSQL_DATABASE:homestead
3132
MYSQL_USER:homestead
@@ -44,7 +45,7 @@ services:
4445
volumes:
4546
-./src:/var/www/html:delegated
4647
ports:
47-
-"9000:9000"
48+
-9000:9000
4849
networks:
4950
-laravel
5051

@@ -85,3 +86,12 @@ services:
8586
entrypoint:['php', '/var/www/html/artisan']
8687
networks:
8788
-laravel
89+
90+
mailhog:
91+
image:mailhog/mailhog:latest
92+
container_name:mailhog
93+
ports:
94+
-1025:1025
95+
-8025:8025
96+
networks:
97+
-laravel

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp