new structure

This commit is contained in:
Oliver
2025-08-08 16:54:00 -03:00
parent dc80dd9522
commit 3b2d644a1b
33 changed files with 391 additions and 16 deletions

View File

@@ -1,9 +1,11 @@
# ~/.bashrc
echo "command: mount_volume <volume>"
echo "alias: set_dev"
echo "alias: set_prod"
set_dev() {
export HOSTS_FILE="dev"
export hosts_file="/app/hosts.dev"
set_prod() {
export HOSTS_FILE="/app/hosts.all"
echo "HOSTS_FILE set to: $HOSTS_FILE"
}

View File

@@ -33,11 +33,10 @@ COPY template /usr/bin/
COPY dpush /usr/bin/
COPY create_volume /usr/bin/
COPY mount_volume /usr/bin/
COPY set_dev /usr/bin/
COPY .bashrc /root/.bashrc
WORKDIR /data
WORKDIR /app
CMD ["bash"]

View File

@@ -1,7 +1,5 @@
#!/bin/bash
hosts_file="/mnt/encrypted_volume/${HOSTS_FILE:-hosts.txt}"
cmd="$*"
echo "Running on hosts: $cmd"

View File

@@ -10,8 +10,6 @@ fi
LOCAL_FILE="$1"
REMOTE_PATH="$2"
hosts_file="/mnt/encrypted_volume/${HOSTS_FILE:-hosts.txt}"
if [ ! -f "$LOCAL_FILE" ]; then
echo "Error: Local file '$LOCAL_FILE' not found."
exit 1

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env bash
export HOSTS_FILE="dev"

View File

@@ -4,7 +4,6 @@ if [ "$#" -ne 3 ]; then
echo "Usage: $0 <localfile> <remotefile> <host_vars_dir>"
exit 1
fi
hosts_file="/mnt/encrypted_volume/${HOSTS_FILE:-hosts.txt}"
localfile="$1"
remotefile="$2"