-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
43 lines (41 loc) · 1.09 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
version: '3'
services:
hyperf-skeleton:
container_name: labs-api
image: labs-api
build:
context: .
volumes:
- ./:/opt/www
- /opt/www/vendor
ports:
- 9501:9501
- 9500:9500
environment:
- APP_ENV=dev
- SCAN_CACHEABLE=false
# entrypoint: ["php", "/opt/www/bin/hyperf.php", "server:watch"]
entrypoint: ["/opt/www/docker/entrypoint.sh"]
depends_on:
db-labs:
condition: service_healthy
db-labs:
container_name: db-labs
image: mysql:8.3
command: mysqld --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: hyperf
ports:
- '3306:3306'
volumes:
- './docker/db/data:/var/lib/mysql'
- './docker/db/my.cnf:/etc/mysql/conf.d/my.cnf'
- './docker/db/sql:/docker-entrypoint-initdb.d'
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
networks:
default:
name: hyperf-skeleton