Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose localoss instead minio as object storage and add phpmysqladmin as db manager #100

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ PaoPao主要由以下优秀的开源项目/工具构建
```sh
%> git clone https://github.com/rocboss/paopao-ce.git
%> docker compose up --build
# visit http://127.0.0.1:8008
# visit paopao-ce(http://127.0.0.1:8008) and phpMysqlAdmin(http://127.0.0.1:8080)
```
默认是使用config.yaml.sample的配置,如果需要自定义配置,请拷贝默认配置文件(比如config.yaml),修改后再同步配置到docker-compose.yaml如下:
```
Expand All @@ -217,6 +217,7 @@ PaoPao主要由以下优秀的开源项目/工具构建
- paopao-network
....
```
***注意:默认提供的 docker-compose.yaml 仅仅用于搭建本机开发调试环境,paopao-ce/phpMysqlAdmin 默认只能本机访问,如果需要产品部署供外网访问,请自行修改配置参数或使用其他方式部署。***

### API 文档
构建时将 `docs` 添加到TAGS中:
Expand Down
3 changes: 2 additions & 1 deletion config.yaml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Server: # 服务设置
ReadTimeout: 60
WriteTimeout: 60
Features:
Default: ["Base", "MySQL", "Option", "MinIO", "LoggerFile"]
Default: ["Base", "MySQL", "Option", "LocalOSS", "LoggerFile"]
Develop: ["Base", "MySQL", "Option", "Sms", "AliOSS", "LoggerZinc"]
Demo: ["Base", "MySQL", "Option", "Sms", "MinIO", "LoggerZinc"]
Slim: ["Base", "Sqlite3", "LocalOSS", "LoggerFile"]
Base: ["Zinc", "Redis", "Alipay",]
Option: ["SimpleCacheIndex"]
Expand Down
31 changes: 14 additions & 17 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
MYSQL_DATABASE: paopao
MYSQL_USER: paopao
MYSQL_PASSWORD: paopao
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_RANDOM_ROOT_PASSWORD: yes
volumes:
- ./scripts/paopao-mysql.sql:/docker-entrypoint-initdb.d/paopao.sql
- ./data/mysql/data:/var/lib/mysql
Expand All @@ -25,21 +25,6 @@ services:
networks:
- paopao-network

minio:
image: bitnami/minio:latest
restart: always
environment:
MINIO_ROOT_USER: minio-root-user
MINIO_ROOT_PASSWORD: minio-root-password
MINIO_DEFAULT_BUCKETS: paopao:public
ports:
- 127.0.0.1:9000:9000
- 127.0.0.1:9001:9001
volumes:
- ./data/minio/data:/data
networks:
- paopao-network

zinc:
image: public.ecr.aws/prabhat/zinc:latest
user: root
Expand All @@ -54,6 +39,19 @@ services:
DATA_PATH: /data
networks:
- paopao-network

phpmyadmin:
image: phpmyadmin:5.2
depends_on:
- db
ports:
- 127.0.0.1:8080:80
environment:
- PMA_HOST=db
- PMA_USER=paopao
- PMA_PASSWORD=paopao
networks:
- paopao-network

backend:
build:
Expand All @@ -63,7 +61,6 @@ services:
- db
- redis
- zinc
- minio
# modify below to reflect your custom configure
volumes:
- ./config.yaml.sample:/app/paopao-ce/config.yaml
Expand Down