-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
182 lines (171 loc) · 3.51 KB
/
docker-compose.yml
File metadata and controls
182 lines (171 loc) · 3.51 KB
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Based on https://github.com/aschmelyun/docker-compose-laravel
networks:
metafilter:
services:
app:
build:
context: ./docker
dockerfile: Dockerfile.nginx
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
platform: linux/amd64
ports:
- "80:80"
volumes:
- .:/var/www/html:delegated
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- redis
- mysql
- mailhog
networks:
- metafilter
mysql:
image: mysql:9
restart: unless-stopped
tty: true
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
networks:
- metafilter
php:
build:
context: ./docker
dockerfile: Dockerfile.php
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
platform: linux/amd64
ports:
- "9000:9000"
volumes:
- .:/var/www/html:delegated
networks:
- metafilter
redis:
image: redis:alpine
restart: unless-stopped
ports:
- "6379:6379"
networks:
- metafilter
mailhog:
image: mailhog/mailhog:latest
ports:
- "1025:1025"
- "8025:8025"
networks:
- metafilter
composer:
build:
context: ./docker
dockerfile: Dockerfile.php
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
volumes:
- .:/var/www/html:delegated
depends_on:
- php
entrypoint: [ 'composer', '--ignore-platform-reqs' ]
profiles:
- tools
networks:
- metafilter
npm:
image: node:current-alpine
volumes:
- .:/MetaFilter2024
- node-modules:/MetaFilter2024/node_modules
ports:
- "3000:3000"
- "3001:3001"
working_dir: /MetaFilter2024
entrypoint: [ 'npm' ]
environment:
- APP_HOST
- VITE_HOST=0.0.0.0
- VITE_PORT
profiles:
- tools
networks:
- metafilter
artisan:
build:
context: ./docker
dockerfile: Dockerfile.php
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
environment:
- DB_HOST=mysql
- DB_DATABASE
- DB_USERNAME
- DB_PASSWORD
- SERVER_HOST=0.0.0.0
- SERVER_PORT=8000
volumes:
- .:/var/www/html:delegated
depends_on:
- mysql
entrypoint: [ 'php', '/var/www/html/artisan' ]
profiles:
- tools
networks:
- metafilter
dev-frontend:
image: node:current-alpine
volumes:
- .:/MetaFilter2024
- node-modules:/MetaFilter2024/node_modules
ports:
- "5173:5173"
working_dir: /MetaFilter2024
entrypoint: [ 'npm' ]
command: ['run', 'dev']
environment:
- APP_HOST
- VITE_HOST=0.0.0.0
- VITE_PORT
profiles:
- dev-server
networks:
- metafilter
dev-backend:
build:
context: ./docker
dockerfile: Dockerfile.php
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
environment:
- DB_HOST=mysql
- DB_DATABASE
- DB_USERNAME
- DB_PASSWORD
- SERVER_HOST=0.0.0.0
- SERVER_PORT=8000
ports:
- "8000:8000"
volumes:
- .:/var/www/html:delegated
depends_on:
- mysql
entrypoint: [ 'php', '/var/www/html/artisan' ]
command: ['serve']
profiles:
- dev-server
networks:
- metafilter
volumes:
mysql-data:
node-modules: