Overhaul the environment system in bin/ to make the defaults easier to understand. Update the installation instructions.

Fixes #2170, #2372, #2329, #2368
This commit is contained in:
Jyri-Petteri Paloposki 2020-07-19 17:20:35 +03:00
parent 3f22c8a036
commit 4d65a8f761
7 changed files with 37 additions and 25 deletions

View file

@ -1,14 +1,8 @@
#!/bin/sh
# Run a command in the app's environment
set -e
# Find our app dir and just run the command in we're in the container since the
# container is built with an /etc/app-env file inside of it.
appdir=$(cd $(dirname "$0")/.. && pwd)
[ -f /etc/app-env ] && exec "$@"
# Otherwise, run docker compose to run our command in the container
# Check if we've been told to run the command in Docker Composer.
cmd="$@"; [ "$#" -eq 0 ] && cmd=bash
export VOLUME="$appdir:/app"
image=${DOCKER_IMAGE:=web}