mirror of
https://github.com/balena-io/open-balena.git
synced 2025-04-19 08:16:22 +00:00
Use a template for project config
This commit is contained in:
parent
8025a51c6a
commit
f4a614ede2
10
compose/template.yml
Normal file
10
compose/template.yml
Normal file
@ -0,0 +1,10 @@
|
||||
# Project-specific config.
|
||||
#
|
||||
# All paths must be defined relative to `compose/services.yml` regardless of
|
||||
# the location of this file, i.e. refer to `my-open-balena-checkout/somedir`
|
||||
# as `../somedir`. This is because of the way docker-compose handles paths
|
||||
# when specifying multiple configs and open-balena always specifying
|
||||
# `compose/services.yml` as the "base" config.
|
||||
#
|
||||
# You may view the effective config with `scripts/run-fig-command config`.
|
||||
version: '2.1'
|
@ -4,6 +4,7 @@ set -e
|
||||
|
||||
CMD=$0
|
||||
DIR=$(dirname "$CMD")
|
||||
BASE_DIR=$(dirname "$DIR")
|
||||
|
||||
PROJECT_NAME=${1:-demo}
|
||||
HOST_NAME=${2:-openbalena.local}
|
||||
@ -48,7 +49,7 @@ $("${DIR}/make-env" \
|
||||
STR
|
||||
|
||||
echo_bold "==> Adding default compose file..."
|
||||
echo "version: '2.1'" >"${PROJECT_DIR}/docker-compose.yml"
|
||||
cp "${BASE_DIR}/compose/template.yml" "${PROJECT_DIR}/docker-compose.yml"
|
||||
|
||||
# FIXME: should be explicitly requested via a flag
|
||||
echo_bold "==> Patching /etc/hosts..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user