-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
137 lines (130 loc) · 2.89 KB
/
docker-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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
version: '3'
services:
nginx:
container_name: nginx
build:
context: .docker/nginx
dockerfile: Dockerfile
ports:
- 80:80
volumes:
- .:/app
tty: true
depends_on:
- app
app:
container_name: app
build:
context: .docker/app
dockerfile: Dockerfile
environment:
LANG: 'ja_JP.UTF-8'
TZ: 'Asia/Tokyo'
APP_NAME: 'Laravel'
APP_ENV: 'development'
APP_DEBUG: 'true'
APP_URL: 'http://localhost'
LOG_CHANNEL: 'stderr'
DB_CONNECTION: 'pgsql'
# DB_HOST: 'db' W/R を分離している
DB_WRITE_HOST: 'db'
DB_READ_HOST: 'db'
DB_PORT: '5432'
DB_DATABASE: 'laravel_development'
DB_DATABASE_TEST: 'laravel_testing'
DB_USERNAME: 'docker'
DB_PASSWORD: 'docker'
MAIL_DRIVER: 'smtp'
MAIL_HOST: 'mail'
MAIL_PORT: '1025'
MAIL_USERNAME: 'null'
MAIL_PASSWORD: 'null'
MAIL_ENCRYPTION: 'null'
env_file:
- .env
volumes:
- .:/app
expose:
- 9000
tty: true
depends_on:
- db
worker:
container_name: worker
build:
context: .docker/app
dockerfile: Dockerfile
environment:
LANG: 'ja_JP.UTF-8'
TZ: 'Asia/Tokyo'
APP_NAME: 'Laravel'
APP_ENV: 'local'
APP_DEBUG: 'true'
APP_SCHEME: 'http'
LOG_CHANNEL: 'stderr'
DB_CONNECTION: 'pgsql'
# DB_HOST: 'db' W/R を分離している
DB_WRITE_HOST: 'db'
DB_READ_HOST: 'db'
DB_PORT: '5432'
DB_DATABASE: 'laravel_development'
DB_DATABASE_TEST: 'laravel_testing'
DB_USERNAME: 'docker'
DB_PASSWORD: 'docker'
MAIL_DRIVER: 'smtp'
MAIL_HOST: 'mail'
MAIL_PORT: '1025'
MAIL_USERNAME: 'null'
MAIL_PASSWORD: 'null'
MAIL_ENCRYPTION: 'null'
SESSION_DRIVER: 'redis'
CACHE_DRIVER: 'redis'
REDIS_URL: 'redis://:docker@redis:6379'
QUEUE_CONNECTION: 'redis'
FILESYSTEM_DRIVER: 's3'
env_file:
- .env
volumes:
- .:/app
expose:
- 9000
command: php artisan queue:work --tries=1
depends_on:
- db
db:
image: postgres:12-alpine
container_name: db
environment:
TZ: 'Asia/Tokyo'
POSTGRES_USER: 'docker'
POSTGRES_PASSWORD: 'docker'
POSTGRES_DB: 'laravel_development'
volumes:
- ./.docker/db/data:/var/lib/postgresql/data
- ./.docker/db/sql:/docker-entrypoint-initdb.d
ports:
- 5432:5432
redis:
image: redis:6.0
container_name: redis
environment:
TZ: 'Asia/Tokyo'
command: redis-server --requirepass docker
volumes:
- redis:/data
- ./.docker/redis/conf:/user/local/etc/redis
ports:
- 6379:6379
mail:
image: schickling/mailcatcher
container_name: mail
ports:
- 1080:1080
expose:
- 1025
networks:
default:
name: api
volumes:
database:
redis: