Files
ssh/docker/ssh-server/scripts/run-dev.sh
marcio.fernandes ce1d7a749a
All checks were successful
/ ssh-client (push) Successful in 10s
/ ssh-server (push) Successful in 10s
feature/ssh-server (#1)
Co-authored-by: Márcio Fernandes <marcio.fernandes@outlook.pt>
Reviewed-on: #1
2025-09-07 13:50:18 +00:00

40 lines
803 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/home:/home \
-v ./local/config:/etc/app/config \
-v ./local/server-certs:/etc/ssh/certs \
${CONTAINER_TAG}