Files
ssh/docker/ssh-server/scripts/run-dev.sh
Márcio Fernandes f6e6d4dba9
Some checks failed
/ build-docker-image (push) Failing after 23s
ssh server alpha
2025-09-06 23:32:31 +00:00

39 lines
770 B
Bash
Executable File

#!/bin/bash
RUN_ENV=dev
POSSIBLE_ENV_FILES="\
.env
"
if [ -n "${RUN_ENV+x}" ]; then
POSSIBLE_ENV_FILES="$POSSIBLE_ENV_FILES \
.env.${RUN_ENV} \
"
fi
POSSIBLE_ENV_FILES="$POSSIBLE_ENV_FILES \
.env.local"
for file in $POSSIBLE_ENV_FILES; do
if [ -f "$file" ]; then
echo "🔧 Loading variables from $file"
set -a
source "$file"
set +a
else
echo "⚠️ Skipping missing file: $file"
fi
done
# Ignored if uing dev docker file:
# - DEBUG_FILE
# - SSH_SERVER_ENABLED
podman container run -d --rm \
-e DEBUG_FILE="${DEBUG_FILE}" \
-e SSH_SERVER_ENABLED="${SSH_SERVER_ENABLED:-false}" \
-p 2222:22 \
-p 5678:5678 \
-v ./app:/app \
-v ./local/config:/etc/app \
-v ./local/server-certs:/etc/ssh/certs \
${CONTAINER_TAG}