wait-for-it
wait-for-it copied to clipboard
PORT env variable will be overridden
In my use case:
web:
build: .
command: ./wait-for-it.sh mongo:27017 -t 0 -- nodemon server.js
restart: always
environment:
- PORT=8096
volumes:
- .:/code
ports:
- "8096:8096"
links:
- mongo
mongo:
image: 'mongo:3.2.1'
ports:
- '27017:27017'
volumes:
- './data/db:/data/db'
I have environment variable named PORT which will be overridden by mongo's port when running wait-for-it bash. My solution is to change PORT variable in bash to _PORT to make it looks more private.
+1
I also spent an hour debugging because of this. Not sure if this has been fixed otherwise I'm happy to make a pull request.
edit: Yes it is, by #44 and merged in.