Add 15 and update 3 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 47s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 47s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# See https://caddyserver.com/docs/caddyfile
|
||||
|
||||
localhost {
|
||||
root * /srv
|
||||
root * /static
|
||||
file_server
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
# Service settings specific to this server
|
||||
# Service settings specific to this server
|
||||
# (can also override anything in the .template_info.env file in the template to make it specific to this server)
|
||||
CONTAINER_NAME=caddy
|
||||
IMAGE_TAG="latest"
|
||||
|
||||
# Server Settings
|
||||
SSH_USER="root"
|
||||
|
||||
# Static files directory (optional)
|
||||
# If set, maps this host directory to /static in the container
|
||||
# If empty, uses the default config/static directory
|
||||
HOST_STATIC_DIR=""
|
||||
|
||||
@@ -10,6 +10,13 @@ if [ ! -f "${CONFIG_PATH}/caddyfile/Caddyfile" ]; then
|
||||
_die "Caddyfile not found in ${CONFIG_PATH}/caddyfile/Caddyfile"
|
||||
fi
|
||||
|
||||
# Determine static files directory
|
||||
# Use HOST_STATIC_DIR if set, otherwise use config/static
|
||||
if [ -n "${HOST_STATIC_DIR}" ]; then
|
||||
STATIC_DIR="${HOST_STATIC_DIR}"
|
||||
else
|
||||
STATIC_DIR="${CONFIG_PATH}/static"
|
||||
fi
|
||||
|
||||
DOCKER_RUN_CMD="docker run -d \
|
||||
--restart unless-stopped \
|
||||
@@ -21,7 +28,7 @@ DOCKER_RUN_CMD="docker run -d \
|
||||
-v ${CONFIG_PATH}/caddyfile:/etc/caddy \
|
||||
-v ${DATA_VOLUME}:/data \
|
||||
-v ${CONFIG_VOLUME}:/config \
|
||||
-v ${CONFIG_PATH}/static:/srv \
|
||||
-v ${STATIC_DIR}:/static \
|
||||
${IMAGE_REGISTRY}/${IMAGE_REPO}:${IMAGE_TAG}"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user