-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
167 lines (153 loc) · 3.83 KB
/
docker-compose.yml
File metadata and controls
167 lines (153 loc) · 3.83 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
name: ticketsupport
networks:
laravel:
driver: bridge
services:
# Nginx Service
nginx:
build:
context: ./.docker/nginx
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
ports:
- "8000:80"
volumes:
- ./:/var/www/html:delegated
depends_on:
- php
networks:
- laravel
# PHP Service
php: &php-service
build:
context: ./.docker/php
args:
- UID=${UID:-1000}
- GID=${GID:-1000}
working_dir: /var/www/html
ports:
- "9000:9000"
volumes:
- ./:/var/www/html
depends_on:
mysql:
condition: service_healthy
networks:
- laravel
# Composer Service
composer:
<<: *php-service
profiles: ["composer"]
ports: []
depends_on: []
entrypoint: ["composer"]
# Artisan Service
artisan:
<<: *php-service
profiles: ["artisan"]
ports: []
volumes:
- ./:/var/www/html:delegated
entrypoint: ["php", "/var/www/html/artisan"]
# Pest Service
pest:
<<: *php-service
profiles: ["pest"]
ports: []
volumes:
- ./:/var/www/html:delegated
entrypoint: ["./vendor/bin/pest"]
# PHPStan Service
phpstan:
<<: *php-service
profiles: ["phpstan"]
ports: []
volumes:
- ./:/var/www/html:delegated
entrypoint: ["./vendor/bin/phpstan"]
# Pint Service
pint:
<<: *php-service
profiles: ["pint"]
ports: []
volumes:
- ./:/var/www/html:delegated
depends_on: []
entrypoint: ["./vendor/bin/pint"]
# NPM Service
npm:
image: node:current-alpine
profiles: ["npm"]
volumes:
- ./:/var/www/html
working_dir: /var/www/html
entrypoint: ["npm"]
networks:
- laravel
# NPM Running Service
npm-run:
image: node:current-alpine
volumes:
- ./:/var/www/html
working_dir: /var/www/html
command: npm run dev
ports:
- "5173:5173"
networks:
- laravel
# Mysql Service
mysql:
image: mysql/mysql-server:8.0
restart: unless-stopped
tty: true
ports:
- "4306:3306"
volumes:
- ./.docker/mysql/my.cnf:/etc/mysql/my.cnf
- mysqldata:/var/lib/mysql
environment:
MYSQL_DATABASE: ticketSupportDB
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: "%"
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=root
interval: 5s
retries: 10
networks:
- laravel
# Test Database Service
testmysql:
image: mysql/mysql-server:8.0
ports:
- "4307:3306"
environment:
MYSQL_DATABASE: ticketSupportDB
MYSQL_ROOT_PASSWORD: root
MYSQL_ROOT_HOST: "%"
networks:
- laravel
# Mailpit Service
mailpit:
image: axllent/mailpit:latest
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- mailpitdata:/opt
ports:
- "8025:8025" # Web interface
- "1025:1025" # SMTP
environment:
- MP_DATA_FILE=/opt/mailpit.db
- MP_MAX_MESSAGES=100
- TZ=Europe/Amsterdam
- MP_SMTP_AUTH_ACCEPT_ANY
- MP_VERBOSE
- MP_SMTP_AUTH_ALLOW_INSECURE
networks:
- laravel
volumes:
mysqldata:
driver: local
mailpitdata:
driver: local