Skip to content

Commit

Permalink
update docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Allenxuxu committed Jan 15, 2020
1 parent ddfb111 commit 7b74e6b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -12,3 +12,5 @@
*.out

.idea/

deployments/docker-compose/.env
1 change: 1 addition & 0 deletions deployments/docker-compose/.env.example
Expand Up @@ -3,5 +3,6 @@
#MICRO_REGISTRY=etcd
# Set registry address
#MICRO_REGISTRY_ADDRESS=MICRO_REGISTRY_ADDRESS:2379

#DATABASE_URL
DATABASE_URL=root:root@(DATABASE_ADDRESS:3306)/xconf?charset=utf8&parseTime=true&loc=Local
8 changes: 8 additions & 0 deletions deployments/docker-compose/README.md
@@ -1,25 +1,33 @@
# Docker Compose Usage

## 配置

从模板创建配置文件 .env

```shell script
cp .env.example .env
```
根据自己实际情况配置

```shell script
### Registry Config ###
# Set registry provider
#MICRO_REGISTRY=etcd
# Set registry address
#MICRO_REGISTRY_ADDRESS=MICRO_REGISTRY_ADDRESS:2379

#DATABASE_URL
DATABASE_URL=root:root@(DATABASE_ADDRESS:3306)/xconf?charset=utf8&parseTime=true&loc=Local
```

> 如需使用 consul ,请在各个服务中引入 github.com/micro/go-plugins/registry/consul
## 使用

启动全部服务

```shell script
docker-compose up
```

WEB UI: http://127.0.0.1:8080/admin/ui
1 change: 0 additions & 1 deletion deployments/docker-compose/docker-compose.yml
Expand Up @@ -33,7 +33,6 @@ services:
environment:
- MICRO_REGISTRY=${MICRO_REGISTRY}
- MICRO_REGISTRY_ADDRESS=${MICRO_REGISTRY_ADDRESS}
- MICRO_API_HANDLER=http
networks:
- default
ports:
Expand Down

0 comments on commit 7b74e6b

Please sign in to comment.