add hostname to container

show default values in .env
fix terminal to run for set NAME
master
David Kebler 2023-03-31 22:54:16 -07:00
parent c29ae9754c
commit 380f7424a0
3 changed files with 13 additions and 8 deletions

17
.env
View File

@ -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

View File

@ -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:

3
term
View File

@ -1,2 +1,3 @@
#!/bin/bash
docker exec -it caddy-testing
source .env
docker exec -it ${NAME:-caddy} bash -l