mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-21 21:40:48 +02:00
16 lines
440 B
Bash
Executable file
16 lines
440 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
docker_compose="docker compose --file docker-compose.yml"
|
|
|
|
# Find our app dir
|
|
appdir=$(cd $(dirname "$0")/.. && pwd)
|
|
|
|
# Check if we've been told to run the command in Docker Composer.
|
|
cmd="$@"; [ "$#" -eq 0 ] && cmd=bash
|
|
export VOLUME="$appdir"
|
|
image=${DOCKER_IMAGE:=web}
|
|
|
|
port_publish=""; [ "${BIND_DOCKER_SERVICE_PORTS:-}" = 1 ] && port_publish="--service-ports"
|
|
exec $docker_compose run $port_publish --rm $image $cmd
|