diff --git a/docker-compose.yml b/docker-compose.yml index 75352f5..c3523a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: backend: build: context: ./backend - container_name: beyond-backend + container_name: XXX-backend environment: # credenciales del API (las mismas que usas ahora) BASIC_AUTH_USERNAME: "beyond" @@ -15,7 +15,7 @@ services: expose: - "8000" networks: - - beyond-net + - XXX-beyond-net XXXfrontend: build: @@ -23,11 +23,11 @@ services: args: # el front compilar con este BASE_URL -> /api VITE_API_BASE_URL: /api - container_name: beyond-frontend + container_name: XXX-frontend expose: - "4173" networks: - - beyond-net + - XXX-beyond-net - frontend labels: - "traefik.enable=true" @@ -45,7 +45,7 @@ volumes: driver: local networks: - beyond-net: + XXX-beyond-net: driver: bridge frontend: external: true diff --git a/install_beyond.sh b/install_beyond.sh index 59837d2..99a8505 100644 --- a/install_beyond.sh +++ b/install_beyond.sh @@ -6,7 +6,7 @@ set -euo pipefail ############################################### # TODO: pon aquí la URL real de tu repo (sin credenciales) REPO_URL_DEFAULT="https://github.com/igferne/Beyond-Diagnosis.git" -INSTALL_BASE="/home/garbelo/" +INSTALL_BASE="/opt/beyondcx" ############################################### # UTILIDADES @@ -37,7 +37,7 @@ if [ -z "$DOMAIN" ]; then echo "El dominio no puede estar vacío." exit 1 fi -SUBDOMAIN="$DOMAIN%%.*" +SUBDOMAIN=${DOMAIN%%.*} INSTALL_DIR=$INSTALL_BASE"/"$SUBDOMAIN read -rp "Email para Let's Encrypt (avisos de renovación): " EMAIL if [ -z "$EMAIL" ]; then @@ -164,6 +164,9 @@ fi ############################################### step "Descargando/actualizando el repositorio en $INSTALL_DIR" +eval $(ssh-agent -s) +ssh-add /home/garbelo/.ssh/id_ed25519 + if [ -d "$INSTALL_DIR/.git" ]; then echo "Directorio git ya existe, haciendo 'git pull'..." git -C "$INSTALL_DIR" pull --ff-only