forked from ucan-lab/docker-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
77 lines (72 loc) · 1.81 KB
/
compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
volumes:
db-store:
psysh-store:
configs:
db-config:
file: ./infra/docker/mysql/my.cnf
services:
app:
build:
context: .
dockerfile: ./infra/docker/php/Dockerfile
target: ${APP_BUILD_TARGET:-development}
volumes:
- type: bind
source: ./src
target: /workspace
- type: volume
source: psysh-store
target: /root/.config/psysh
volume:
nocopy: true
environment:
# Please remove this environment variable, after created the Laravel project. Please write in .env
- DB_CONNECTION=${DB_CONNECTION:-mysql}
- DB_HOST=${DB_HOST:-db}
- DB_PORT=${DB_PORT:-3306}
- DB_DATABASE=${DB_DATABASE:-laravel}
- DB_USERNAME=${DB_USERNAME:-phper}
- DB_PASSWORD=${DB_PASSWORD:-secret}
web:
build:
context: .
dockerfile: ./infra/docker/nginx/Dockerfile
ports:
- target: 80
published: ${WEB_PUBLISHED_PORT:-80}
protocol: tcp
mode: host
volumes:
- type: bind
source: ./src
target: /workspace
db:
build:
context: .
dockerfile: ./infra/docker/mysql/Dockerfile
ports:
- target: 3306
published: ${DB_PUBLISHED_PORT:-3306}
protocol: tcp
mode: host
configs:
- source: db-config
target: /etc/my.cnf
volumes:
- type: volume
source: db-store
target: /var/lib/mysql
volume:
nocopy: true
environment:
- MYSQL_DATABASE=${DB_DATABASE:-laravel}
- MYSQL_USER=${DB_USERNAME:-phper}
- MYSQL_PASSWORD=${DB_PASSWORD:-secret}
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD:-secret}
mailpit:
image: axllent/mailpit
ports:
- target: 8025
published: ${MAILPIT_PUBLISHED_PORT:-8025}
protocol: tcp
mode: host