feature/ssh-server (#1)
Co-authored-by: Márcio Fernandes <marcio.fernandes@outlook.pt> Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
40
docker/ssh-server/scripts/run-dev.sh
Executable file
40
docker/ssh-server/scripts/run-dev.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/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}
|
||||
|
||||
Reference in New Issue
Block a user