mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Publish ports based on environment variable
Allows two things: 1. Access a running server from outside the docker container 2. Run both a console and a server at the same time, for debugging or whatever else.
This commit is contained in:
parent
b0993b0c76
commit
ec2b6cf22e
1 changed files with 2 additions and 1 deletions
|
|
@ -13,4 +13,5 @@ cmd="$@"; [ "$#" -eq 0 ] && cmd=bash
|
||||||
export VOLUME="$appdir:/app"
|
export VOLUME="$appdir:/app"
|
||||||
image=${DOCKER_IMAGE:=web}
|
image=${DOCKER_IMAGE:=web}
|
||||||
|
|
||||||
exec docker-compose run --rm $image $cmd
|
port_publish=""; [ "${BIND_DOCKER_SERVICE_PORTS:-}" = 1 ] && port_publish="--service-ports"
|
||||||
|
exec docker-compose run $port_publish --rm $image $cmd
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue