WIP proxy #3

Open
garbelo wants to merge 65 commits from proxy into main
2 changed files with 10 additions and 7 deletions
Showing only changes of commit 9effa23d3b - Show all commits

View File

@@ -4,7 +4,7 @@ services:
backend: backend:
build: build:
context: ./backend context: ./backend
container_name: beyond-backend container_name: XXX-backend
environment: environment:
# credenciales del API (las mismas que usas ahora) # credenciales del API (las mismas que usas ahora)
BASIC_AUTH_USERNAME: "beyond" BASIC_AUTH_USERNAME: "beyond"
@@ -15,7 +15,7 @@ services:
expose: expose:
- "8000" - "8000"
networks: networks:
- beyond-net - XXX-beyond-net
XXXfrontend: XXXfrontend:
build: build:
@@ -23,11 +23,11 @@ services:
args: args:
# el front compilar con este BASE_URL -> /api # el front compilar con este BASE_URL -> /api
VITE_API_BASE_URL: /api VITE_API_BASE_URL: /api
container_name: beyond-frontend container_name: XXX-frontend
expose: expose:
- "4173" - "4173"
networks: networks:
- beyond-net - XXX-beyond-net
- frontend - frontend
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
@@ -45,7 +45,7 @@ volumes:
driver: local driver: local
networks: networks:
beyond-net: XXX-beyond-net:
driver: bridge driver: bridge
frontend: frontend:
external: true external: true

View File

@@ -6,7 +6,7 @@ set -euo pipefail
############################################### ###############################################
# TODO: pon aquí la URL real de tu repo (sin credenciales) # TODO: pon aquí la URL real de tu repo (sin credenciales)
REPO_URL_DEFAULT="https://github.com/igferne/Beyond-Diagnosis.git" REPO_URL_DEFAULT="https://github.com/igferne/Beyond-Diagnosis.git"
INSTALL_BASE="/home/garbelo/" INSTALL_BASE="/opt/beyondcx"
############################################### ###############################################
# UTILIDADES # UTILIDADES
@@ -37,7 +37,7 @@ if [ -z "$DOMAIN" ]; then
echo "El dominio no puede estar vacío." echo "El dominio no puede estar vacío."
exit 1 exit 1
fi fi
SUBDOMAIN="$DOMAIN%%.*" SUBDOMAIN=${DOMAIN%%.*}
INSTALL_DIR=$INSTALL_BASE"/"$SUBDOMAIN INSTALL_DIR=$INSTALL_BASE"/"$SUBDOMAIN
read -rp "Email para Let's Encrypt (avisos de renovación): " EMAIL read -rp "Email para Let's Encrypt (avisos de renovación): " EMAIL
if [ -z "$EMAIL" ]; then if [ -z "$EMAIL" ]; then
@@ -164,6 +164,9 @@ fi
############################################### ###############################################
step "Descargando/actualizando el repositorio en $INSTALL_DIR" 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 if [ -d "$INSTALL_DIR/.git" ]; then
echo "Directorio git ya existe, haciendo 'git pull'..." echo "Directorio git ya existe, haciendo 'git pull'..."
git -C "$INSTALL_DIR" pull --ff-only git -C "$INSTALL_DIR" pull --ff-only