-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
100 lines (93 loc) · 2.65 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
version: '3'
services:
# NGINX + FPM + PHP 8.3
app:
image: wendelladriel/laravel-exa
container_name: laravel-exa
build:
context: .
dockerfile: docker/app/Dockerfile
args:
- M1_PROCESSOR=${M1_PROCESSOR}
- XDEBUG_ENABLED=${XDEBUG_ENABLED}
volumes:
- ./:/var/www
ports:
- "${APP_EXTERNAL_PORT}:80"
- "${APP_EXTERNAL_PORT_SSL}:443"
networks:
- laravel-exa
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
depends_on:
- redis
- mysql
# REDIS
redis:
image: wendelladriel/laravel-exa-redis
container_name: laravel-exa-redis
build:
context: .
dockerfile: docker/redis/Dockerfile
ports:
- "${REDIS_EXTERNAL_PORT}:6379"
volumes:
- ./docker/redis/data:/data
networks:
- laravel-exa
healthcheck:
test: ["CMD", "redis-cli", "-h", "${REDIS_HOST:-localhost}", "-p", "${REDIS_PORT}:-6379", "-a", "${REDIS_PASSWORD:-null}", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# MYSQL
mysql:
image: mysql:8.0
container_name: laravel-exa-db
ports:
- "${DB_EXTERNAL_PORT}:3306"
volumes:
- dbdata:/var/lib/mysql
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_USER: ${DB_USERNAME}
networks:
- laravel-exa
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u${DB_USER:-exa} -p${DB_PASSWORD:-secret}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# MAILPIT
mailpit:
image: axllent/mailpit
container_name: laravel-exa-mailpit
ports:
- "${MAILPIT_EXTERNAL_PORT_SMTP}:1025"
- "${MAILPIT_EXTERNAL_PORT_HTTP}:8025"
networks:
- laravel-exa
# SWAGGER
swagger:
image: wendelladriel/laravel-exa-swagger
container_name: laravel-exa-swagger
build:
context: .
dockerfile: docker/swagger/Dockerfile
restart: always
ports:
- "${SWAGGER_EXTERNAL_PORT}:8080"
networks:
laravel-exa:
driver: bridge
volumes:
dbdata:
driver: local