Skip to content

Commit 7250cbf

Browse files
committed
more efficient no_proxy; cleanup
1 parent 3292943 commit 7250cbf

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

docker-compose-voteapp.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,5 @@ services:
3535
aliases:
3636
- workers
3737

38-
redis:
39-
image: redis:3.2-alpine
40-
ports:
41-
- "6379"
42-
networks:
43-
- voteapp
44-
container_name: redis
45-
46-
db:
47-
image: postgres:9.4
48-
volumes:
49-
- db-data:/var/lib/postgresql/data
50-
networks:
51-
- voteapp
52-
container_name: db
53-
54-
volumes:
55-
db-data:
56-
# driver: rexray
57-
# driver_opts:
58-
# size: 10
59-
6038
networks:
6139
voteapp:

set_network.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/bash
22

33
subnet=$(docker network inspect --format='{{(index (index .IPAM.Config) 0).Subnet}}' examplevotingapp_voteapp)
4+
45
[ $http_proxy ] && tb_proxy=$http_proxy || tb_proxy=$HTTP_PROXY
5-
[ $no_proxy ] && tb_no_proxy=$no_proxy,result,es,$(seq -s ',' -f $(echo $subnet | cut -d '.' -f1-3).%g 0 255) || tb_no_proxy=$(seq -s ',' -f $(echo $subnet | cut -d '.' -f1-3).%g 0 255)
6+
tb_no_proxy=$(echo redis,db,voting-app,result,es),$(seq -s ',' -f $(echo $subnet | cut -d '.' -f1-3).%g 0 255)
7+
[ $no_proxy ] && tb_no_proxy=$tb_no_proxy,$no_proxy,127.0.0.1,localhost || tb_no_proxy=$tb_no_proxy,$NO_PROXY,127.0.0.1,localhost
68

79
# echo tb_proxy=$tb_proxy
810
# echo tb_no_proxy=$tb_no_proxy

0 commit comments

Comments
 (0)