feat: phase 3 redesign, game images, auth system, vm guides, service isolation
Some checks failed
Deploy Multi-VM / Deploy VM Web (push) Has been cancelled
Deploy Multi-VM / Deploy VM Auth (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.fusionfall.yml, VM_FUSIONFALL_HOST, VM_FUSIONFALL_SSH_KEY, VM_FUSIONFALL_USER, fusionfall) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.maple2.yml, VM_MAPLE2_HOST, VM_MAPLE2_SSH_KEY, VM_MAPLE2_USER, maple2) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.minecraft.yml, VM_MINECRAFT_HOST, VM_MINECRAFT_SSH_KEY, VM_MINECRAFT_USER, minecraft) (push) Has been cancelled
Deploy Multi-VM / Deploy Game Servers (docker-compose.retro.yml, VM_RETRO_HOST, VM_RETRO_SSH_KEY, VM_RETRO_USER, retro) (push) Has been cancelled

- Redesign all internal pages to warm/gold aesthetic (catalog, game detail,
  documentary, about, donate, community, guides, contact, server-status,
  login, profile, admin, not-found)
- Add real cover images for all 4 games via Strapi CMS with getImageUrl helper
- Integrate NextAuth v5 with Authentik OIDC authentication
- Add new public pages: community, guides, contact, server-status
- Add new protected pages: login, profile, admin dashboard
- Remove legacy AFC/MercadoPago system entirely
- Add Docker Compose split files for service isolation (main, auth, fusionfall, nier)
- Add OpenFusion VM deployment configs (config.vm.ini, systemd service, README-VM)
- Add NieR Reincarnation server guide and desktop client guide
- Add architecture docs for multi-VM deployment
- Add healthcheck, SSE, contact, newsletter, admin API routes
- Add reusable UI components, skeleton loaders, activity feed, bookmark system
- Update deployment and game server documentation
This commit is contained in:
consultoria-as
2026-04-28 05:15:38 +00:00
parent ea142501fa
commit 449c02eadc
151 changed files with 10053 additions and 2312 deletions

138
scripts/setup-game-vm.sh Executable file
View File

@@ -0,0 +1,138 @@
#!/bin/bash
# =============================================================================
# setup-game-vm.sh — Preparar una VM limpia para un servidor de juegos
# =============================================================================
# Uso: ./setup-game-vm.sh <nombre-del-juego>
# Ejemplo: ./setup-game-vm.sh nier
#
# Instala Docker, Docker Compose, Git, configura firewall y deja todo listo
# para ejecutar install.sh
# =============================================================================
set -e
GAME="$1"
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
log_ok() { echo -e "${GREEN}[OK]${NC} $1"; }
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
if [ -z "$GAME" ]; then
log_error "Debes especificar el nombre del juego."
echo "Uso: $0 <nombre-del-juego>"
echo "Ejemplos: nier, dbo, maple2, fusionfall"
exit 1
fi
# -----------------------------------------------------------------------------
# Puertos por juego
# -----------------------------------------------------------------------------
declare -A GAME_PORTS
declare -A GAME_RAM
declare -A GAME_DESC
GAME_PORTS[nier]="80/tcp 443/tcp"
GAME_PORTS[dbo]="22000/tcp 22001/tcp 22002/tcp 22003/tcp 22004/tcp 22005/tcp 22006/tcp 22007/tcp 22008/tcp 22009/tcp 22010/tcp"
GAME_PORTS[maple2]="20001/tcp 21001/tcp 20003/tcp 21003/tcp 4000/tcp"
GAME_PORTS[fusionfall]="23000/tcp 23001/tcp"
GAME_RAM[nier]="1"
GAME_RAM[dbo]="2"
GAME_RAM[maple2]="2"
GAME_RAM[fusionfall]="512"
GAME_DESC[nier]="NieR Reincarnation (MariesWonderland)"
GAME_DESC[dbo]="Dragon Ball Online (DBO Global)"
GAME_DESC[maple2]="MapleStory 2 (Maple2)"
GAME_DESC[fusionfall]="FusionFall (OpenFusion)"
PORTS="${GAME_PORTS[$GAME]}"
RAM="${GAME_RAM[$GAME]}"
DESC="${GAME_DESC[$GAME]}"
if [ -z "$PORTS" ]; then
log_error "Juego desconocido: $GAME"
exit 1
fi
echo ""
echo "=========================================="
echo " Setup VM: $DESC"
echo "=========================================="
echo ""
# -----------------------------------------------------------------------------
# 1. Actualizar sistema
# -----------------------------------------------------------------------------
log_info "Actualizando sistema..."
apt-get update && apt-get upgrade -y
# -----------------------------------------------------------------------------
# 2. Instalar dependencias
# -----------------------------------------------------------------------------
log_info "Instalando dependencias..."
apt-get install -y curl wget git ufw ca-certificates gnupg lsb-release
# -----------------------------------------------------------------------------
# 3. Instalar Docker
# -----------------------------------------------------------------------------
if ! command -v docker &> /dev/null; then
log_info "Instalando Docker..."
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
systemctl enable docker
systemctl start docker
log_ok "Docker instalado."
else
log_ok "Docker ya estaba instalado."
fi
# -----------------------------------------------------------------------------
# 4. Firewall
# -----------------------------------------------------------------------------
log_info "Configurando firewall..."
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
for port in $PORTS; do
ufw allow "$port"
log_info " Puerto abierto: $port"
done
ufw --force enable
log_ok "Firewall configurado."
# -----------------------------------------------------------------------------
# 5. Directorio del proyecto
# -----------------------------------------------------------------------------
PROJECT_DIR="/opt/project-afterlife"
mkdir -p "$PROJECT_DIR"
# -----------------------------------------------------------------------------
# 6. Resumen
# -----------------------------------------------------------------------------
echo ""
echo "=========================================="
echo " VM $GAME — Setup Completado"
echo "=========================================="
echo ""
echo "Juego: $DESC"
echo "RAM estimada: ${RAM} GB"
echo "Puertos: $PORTS"
echo "Docker: $(docker --version)"
echo "UFW: activo"
echo ""
echo "Proximos pasos:"
echo " 1. git clone https://git.consultoria-as.com/consultoria-as/project-afterlife.git $PROJECT_DIR"
echo " 2. cd $PROJECT_DIR"
echo " 3. cp docker/.env.example docker/.env"
echo " 4. Edita las variables especificas de $GAME en docker/.env"
echo " 5. ./scripts/install.sh $GAME"
echo ""