From 380f7424a0cf1eb26e7f75f14a43fb171c0c241f Mon Sep 17 00:00:00 2001 From: David Kebler Date: Fri, 31 Mar 2023 22:54:16 -0700 Subject: [PATCH] add hostname to container show default values in .env fix terminal to run for set NAME --- .env | 17 ++++++++++------- docker-compose.yaml | 1 + term | 3 ++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.env b/.env index 67eaba8..6a04c23 100644 --- a/.env +++ b/.env @@ -1,9 +1,12 @@ -CREDENTIALS=/data/secure/aws-credentials.env -CONF=seldon -NAME=caddy -# just base alpine image unless used here -BASE_IMAGE=ucommandit/alpine -BUILD_SRC=./src -NAME=caddy +# creditials required for route 53, this is package specific +# CREDENTIALS=/data/secure/aws-credentials.env +# will use Caddyfile unless CONF is set +# CONF=seldon +# default NAME is caddy +# NAME=caddy +# Will use dockerhub official base alpine image unless used here +# BASE_IMAGE=ucommandit/alpine +# will find src/ but setting this will speed it up +# BUILD_SRC=./src # version is latest unless used here # TAG=2.1.5 diff --git a/docker-compose.yaml b/docker-compose.yaml index eae98b1..df15537 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,6 +6,7 @@ services: image: ${IMAGE:-caddy} # if no $CONF is given then Caddyfile in ${PWD}/conf:/opt/caddy/conf will be used command: /opt/caddy/caddy run $CONF + hostname: ${NAME:-caddy} env_file: - $CREDENTIALS volumes: diff --git a/term b/term index 73e6875..08282d3 100755 --- a/term +++ b/term @@ -1,2 +1,3 @@ #!/bin/bash -docker exec -it caddy-testing \ No newline at end of file +source .env +docker exec -it ${NAME:-caddy} bash -l \ No newline at end of file