使用官方的dockerfile启动成功
# 官方的包拉下来,主要需要修改的就是dockerfile文件
version: '3'
services:
hyperf:
build:
dockerfile: Dockerfile
context: .
restart: always
environment:
- "TIMEZONE=Asia/Shanghai"
- "APP_NAME=MineAdmin"
working_dir: "/opt/www"
volumes:
- ./:/opt/www
entrypoint: ["php", "watch", "-c"]
ports:
- "9599:9501"
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: Work@Play7
MYSQL_ROOT_HOST: '%'
ports:
- "3306:3306"
redis:
image: redis:alpine
restart: always
ports:
- "6379:6379"
frontend:
build:
context: ./web
args:
MINE_NODE_ENV: production
NPM_REGISTRY: https://registry.npmmirror.com
PNPM_REGISTRY: https://registry.npmmirror.com
restart: always
ports:
- "80:80"
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
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
# 启动命令
docker-compose up -d
hyperf项目名称
jiuaiquishuiyin-hyperf-1
# 重新安装vender
composer install -vvv
数据表迁移
php bin/hyperf.php migrate
数据库填充
php bin/hyperf.php db:seed
启动前端后默认登陆密码是admin 123456
修改后的用户名为admin 密码为admin123456
编辑 (opens new window)
上次更新: 2024/12/18, 17:45:13
- 01
- 免费的在线logo设计,uugai找了我好就12-24
- 02
- Untitled12-24