Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
800db837bb | ||
|
|
69e1f35886 |
20
.env.example
20
.env.example
@@ -1,13 +1,25 @@
|
|||||||
|
# ===========================================
|
||||||
|
# Archivo de ejemplo de configuración
|
||||||
|
# Copia este archivo a .env y modifica los valores
|
||||||
|
# ===========================================
|
||||||
|
|
||||||
# Configuración de red local
|
# Configuración de red local
|
||||||
# Cambia esta IP a la IP de tu PC en la red local
|
# Cambia esta IP a la IP de tu PC en la red local
|
||||||
HOST_IP=192.168.1.131
|
HOST_IP=192.168.1.XXX
|
||||||
|
|
||||||
# URLs para desarrollo local
|
# URLs para desarrollo local
|
||||||
NEXT_PUBLIC_API_URL=http://192.168.1.131:4000
|
NEXT_PUBLIC_API_URL=http://192.168.1.XXX:4000
|
||||||
CORS_ORIGIN=http://192.168.1.131:3000
|
CORS_ORIGIN=http://192.168.1.XXX:3000
|
||||||
|
|
||||||
|
# URLs para producción (descomentar y ajustar)
|
||||||
|
# NEXT_PUBLIC_API_URL=https://api.tudominio.com
|
||||||
|
# CORS_ORIGIN=https://tudominio.com
|
||||||
|
|
||||||
# Configuración de base de datos
|
# Configuración de base de datos
|
||||||
DATABASE_URL=postgresql://postgres:password@db:5432/resistencia
|
DATABASE_URL=postgresql://postgres:password@db:5432/resistencia
|
||||||
POSTGRES_USER=postgres
|
POSTGRES_USER=postgres
|
||||||
POSTGRES_PASSWORD=password
|
POSTGRES_PASSWORD=cambia_esta_contraseña
|
||||||
POSTGRES_DB=resistencia
|
POSTGRES_DB=resistencia
|
||||||
|
|
||||||
|
# Contraseña del dashboard de administración
|
||||||
|
NEXT_PUBLIC_ADMIN_PASSWORD=cambia_esta_contraseña
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
FROM node:20-alpine
|
FROM node:20-alpine
|
||||||
|
|
||||||
# Build argument for API URL
|
# Build arguments
|
||||||
ARG NEXT_PUBLIC_API_URL=http://localhost:4000
|
ARG NEXT_PUBLIC_API_URL=http://localhost:4000
|
||||||
|
ARG NEXT_PUBLIC_ADMIN_PASSWORD=admin123
|
||||||
|
|
||||||
|
# Make args available as env vars during build
|
||||||
|
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
|
||||||
|
ENV NEXT_PUBLIC_ADMIN_PASSWORD=$NEXT_PUBLIC_ADMIN_PASSWORD
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { motion, AnimatePresence } from 'framer-motion';
|
|||||||
import { useSocket } from '../../hooks/useSocket';
|
import { useSocket } from '../../hooks/useSocket';
|
||||||
import { Shield, Users, Gamepad2, LogOut, Clock, History, UserMinus, Key, ChevronDown } from 'lucide-react';
|
import { Shield, Users, Gamepad2, LogOut, Clock, History, UserMinus, Key, ChevronDown } from 'lucide-react';
|
||||||
|
|
||||||
const ADMIN_PASSWORD = "admin123";
|
const ADMIN_PASSWORD = process.env.NEXT_PUBLIC_ADMIN_PASSWORD || "admin123";
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
const { socket, isConnected } = useSocket();
|
const { socket, isConnected } = useSocket();
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ services:
|
|||||||
dockerfile: client/Dockerfile
|
dockerfile: client/Dockerfile
|
||||||
args:
|
args:
|
||||||
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-https://api.franciaocupada.martivich.es}
|
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-https://api.franciaocupada.martivich.es}
|
||||||
|
- NEXT_PUBLIC_ADMIN_PASSWORD=${NEXT_PUBLIC_ADMIN_PASSWORD:-admin123}
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -15,6 +16,7 @@ services:
|
|||||||
- /app/client/node_modules
|
- /app/client/node_modules
|
||||||
environment:
|
environment:
|
||||||
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-https://api.franciaocupada.martivich.es}
|
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-https://api.franciaocupada.martivich.es}
|
||||||
|
- NEXT_PUBLIC_ADMIN_PASSWORD=${NEXT_PUBLIC_ADMIN_PASSWORD:-admin123}
|
||||||
depends_on:
|
depends_on:
|
||||||
- server
|
- server
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user