Skip to content

Commit

Permalink
fix: docker compose run.sh (#1282)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Apr 27, 2022
1 parent bb49a60 commit 798ebb7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
7 changes: 7 additions & 0 deletions deploy/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

> Currently, docker compose deploying is tested just in single host, no HA support.
Please replace the `sed` with `gnu-sed` in macOS.

```shell
brew install gnu-sed
alias sed=gsed
```

## Deploy with Docker Compose

The `run.sh` script will generate config and deploy all components with `docker-compose`.
Expand Down
13 changes: 9 additions & 4 deletions deploy/docker-compose/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ cd $DIR
prepare(){
mkdir -p config

cat template/cdn.template.yaml > config/cdn.yaml
cat template/dfget.template.yaml > config/dfget.yaml
cat template/scheduler.template.yaml > config/scheduler.yaml
cat template/manager.template.yaml > config/manager.yaml

ip=${IP:-$(hostname -i)}

sed "s,__IP__,$ip," config/dfget.yaml > config/dfget.yaml
sed "s,__IP__,$ip," config/cdn.yaml > config/cdn.yaml
sed "s,__IP__,$ip," config/scheduler.yaml > config/scheduler.yaml
sed "s,__IP__,$ip," config/manager.yaml > config/manager.yaml
sed -i "s,__IP__,$ip," config/dfget.yaml
sed -i "s,__IP__,$ip," config/cdn.yaml
sed -i "s,__IP__,$ip," config/scheduler.yaml
sed -i "s,__IP__,$ip," config/manager.yaml
}

run_container(){
Expand Down

0 comments on commit 798ebb7

Please sign in to comment.