Skip to content

Commit c24d20b

Browse files
waiting using just bash
1 parent 56b44b5 commit c24d20b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scdf/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ at the time of writing:
2020
https://raw.githubusercontent.com/spring-cloud/spring-cloud-dataflow/v2.9.1/src/docker-compose/docker-compose.yml
2121
```
2222

23+
the file `docker-compose.yaml` in this directory contains the amended file
24+
without `apt-get update` on startup (!!) [1][1].
25+
26+
[1]: https://arstechnica.com/tech-policy/2021/02/comcast-responds-to-pressure-cancels-data-cap-in-northeast-us-until-2022/

scdf/docker-compose.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,8 @@ services:
8686
- skipper-server
8787
entrypoint: >
8888
bin/sh -c "
89-
apt-get update && apt-get install --no-install-recommends -y wget &&
90-
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
91-
chmod a+x /tmp/wait-for-it.sh &&
92-
/tmp/wait-for-it.sh mysql:3306 -- /cnb/process/web"
89+
host=mysql; port=3306; start=$$(date +%s); while true; do if (echo -n > /dev/tcp/$$host/$$port)>/dev/null 2>&1 ; then echo done; break; else echo trying again after $$(($$(date +%s) - $$start)) seconds for $$host:$$port; sleep 1; fi; done; echo available after $$(($$(date +%s) - $$start)) seconds;
90+
/cnb/process/web"
9391
restart: always
9492
volumes:
9593
- ${HOST_MOUNT_PATH:-.}:${DOCKER_MOUNT_PATH:-/home/cnb/scdf}
@@ -136,10 +134,8 @@ services:
136134
- LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_SKIPPER_SERVER_DEPLOYER=ERROR
137135
entrypoint: >
138136
bin/sh -c "
139-
apt-get update && apt-get install --no-install-recommends -y wget &&
140-
wget --no-check-certificate -P /tmp/ https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh &&
141-
chmod a+x /tmp/wait-for-it.sh &&
142-
/tmp/wait-for-it.sh mysql:3306 -- /cnb/process/web"
137+
host=mysql; port=3306; start=$$(date +%s); while true; do if (echo -n > /dev/tcp/$$host/$$port)>/dev/null 2>&1 ; then echo done; break; else echo trying again after $$(($$(date +%s) - $$start)) seconds for $$host:$$port; sleep 1; fi; done; echo available after $$(($$(date +%s) - $$start)) seconds;
138+
/cnb/process/web"
143139
restart: always
144140
volumes:
145141
- ${HOST_MOUNT_PATH:-.}:${DOCKER_MOUNT_PATH:-/home/cnb/scdf}

0 commit comments

Comments
 (0)