-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
121 lines (121 loc) · 2.78 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
version: "3.5"
services:
laravel.test:
container_name: ${PROJECT_NAME}-app
build:
context: ./
dockerfile: Dockerfile
args:
WWWGROUP: ${WWWGROUP}
image: laravel-restful-api/${PROJECT_NAME}
ports:
- ${APP_HTTP_PORT:-80}:80
environment:
WWWUSER: ${WWWUSER}
LARAVEL_SAIL: 1
volumes:
- .:/var/www/html
networks:
- "laravel-network"
cap_add:
- NET_BIND_SERVICE
healthcheck:
test: curl --fail -s http://127.0.0.1:80/ || exit 1
interval: 1m30s
timeout: 10s
retries: 3
depends_on:
- mysql
- redis
- soketi
links:
- mysql
- redis
mysql:
container_name: ${PROJECT_NAME}-mysql
image: mysql:8.0
privileged: false
security_opt:
- no-new-privileges:true
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
volumes:
- vmysql:/var/lib/mysql
ports:
- 3306:3306
networks:
- "laravel-network"
healthcheck:
test: [ CMD, mysqladmin, ping, -h, localhost ]
timeout: 45s
interval: 10s
retries: 10
phpmyadmin:
container_name: ${PROJECT_NAME}-phpmyadmin
image: phpmyadmin
privileged: false
security_opt:
- no-new-privileges:true
ports:
- ${FORWARD_PHPMYADMIN_PORT:-8080}:80
environment:
PMA_ARBITRARY: 1
PMA_HOST: mysql
PMA_USER: ${DB_USERNAME}
PMA_PASSWORD: ${DB_PASSWORD}
MYSQL_PASSWORD: ${DB_PASSWORD}
depends_on:
- mysql
networks:
- "laravel-network"
redis:
container_name: ${PROJECT_NAME}-redis
image: redis:alpine
privileged: false
security_opt:
- no-new-privileges:true
volumes:
- "vredis:/data"
ports:
- ${FORWARD_REDIS_PORT:-6379}:6379
networks:
- "laravel-network"
healthcheck:
test: [ CMD, redis-cli, ping ]
timeout: 45s
interval: 10s
retries: 10
soketi:
container_name: ${PROJECT_NAME}-soketi
image: 'quay.io/soketi/soketi:latest-16-alpine'
environment:
SOKETI_DEBUG: '1'
SOKETI_METRICS_SERVER_PORT: '9601'
ports:
- '${SOKETI_PORT:-6001}:6001'
- '${SOKETI_METRICS_SERVER_PORT:-9601}:9601'
depends_on:
- mysql
networks:
- "laravel-network"
mailhog:
container_name: ${PROJECT_NAME}-mailhog
image: 'mailhog/mailhog:latest'
ports:
- '${FORWARD_MAILHOG_PORT:-1025}:1025'
- '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
networks:
- "laravel-network"
networks:
laravel-network:
name: ${PROJECT_NAME}-network
driver: bridge
volumes:
vmysql:
driver: local
vredis:
driver: local