-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (50 loc) · 986 Bytes
/
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
version: '3.7'
services:
mysql:
image: "mysql/mysql-server:8.0"
environment:
TZ: "Asia/Shanghai"
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: "hyperf"
networks:
- net
volumes:
- mysql-data:/var/lib/mysql
- ./.github/init.sql:/docker-entrypoint-initdb.d/init.sql
restart: "always"
redis:
image: "redis"
command:
- "redis-server"
- "--databases 256"
networks:
- net
volumes:
- redis-data:/data
restart: "always"
hyperf:
image: "hyperf/biz-skeleton:latest"
build:
context: "."
depends_on:
- mysql
- redis
environment:
APP_ENV: "${APP_ENV:-prod}"
DB_HOST: "mysql"
REDIS_HOST: "redis"
ports:
- "9501:9501"
volumes:
- "./.env.example:/opt/www/.env"
networks:
- net
restart: "always"
deploy:
replicas: 1
networks:
net:
volumes:
mysql-data:
redis-data: