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 # creditials required for route 53, this is package specific
CONF=seldon # CREDENTIALS=/data/secure/aws-credentials.env
NAME=caddy # will use Caddyfile unless CONF is set
# just base alpine image unless used here # CONF=seldon
BASE_IMAGE=ucommandit/alpine # default NAME is caddy
BUILD_SRC=./src # NAME=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 # version is latest unless used here
# TAG=2.1.5 # TAG=2.1.5

View File

@ -6,6 +6,7 @@ services:
image: ${IMAGE:-caddy} image: ${IMAGE:-caddy}
# if no $CONF is given then Caddyfile in ${PWD}/conf:/opt/caddy/conf will be used # if no $CONF is given then Caddyfile in ${PWD}/conf:/opt/caddy/conf will be used
command: /opt/caddy/caddy run $CONF command: /opt/caddy/caddy run $CONF
hostname: ${NAME:-caddy}
env_file: env_file:
- $CREDENTIALS - $CREDENTIALS
volumes: volumes:

3
term
View File

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