Skip to content

Commit

Permalink
Update docker compose document (#2997)
Browse files Browse the repository at this point in the history
Signed-off-by: TommyLike <[email protected]>
  • Loading branch information
TommyLike authored Jan 5, 2024
1 parent dbe835e commit 1e39879
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
14 changes: 14 additions & 0 deletions deploy/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ The `run.sh` script will generate config and deploy all components with `docker-
Just run:

```shell
# Without network=host mode,the HOST IP would be the docker network gateway IP address, use the command below to
# obtain the ip address, "docker network inspect bridge -f '{{range .IPAM.Config}}{{.Gateway}}{{end}}'"
export IP=<host ip>
./run.sh
```

## Delete containers with docker compose

```shell
docker compose down
```

## Deploy without Docker Compose

Just run:
Expand All @@ -31,3 +39,9 @@ export IP=<host ip>
export RUNTIME=pouch
./run.sh container
```

## Delete containers without docker compose

```shell
./run.sh delete_container
```
13 changes: 12 additions & 1 deletion deploy/docker-compose/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ prepare(){
sed "s,__IP__,$ip," template/manager.template.yaml > config/manager.yaml
}

delete_container(){
RUNTIME=${RUNTIME:-docker}
echo use container runtime: ${RUNTIME}

echo try to clean old containers
${RUNTIME} rm -f dragonfly-redis dragonfly-mysql dragonfly-manager dragonfly-scheduler \
dragonfly-dfdaemon dragonfly-seed-peer
}

run_container(){
RUNTIME=${RUNTIME:-docker}
echo use container runtime: ${RUNTIME}
Expand Down Expand Up @@ -71,7 +80,9 @@ case "$1" in
container)
run_container
;;

delete_container)
delete_container
;;
*)
if [ -z "$1" ]; then
# start all of docker-compose defined service
Expand Down

0 comments on commit 1e39879

Please sign in to comment.