Add initial project setup with Vite, Mantine, and Docker configuration

This commit is contained in:
2025-03-17 22:39:45 +01:00
parent 1a49b8676f
commit 76384a9eca
54 changed files with 11005 additions and 83 deletions
+66 -7
View File
@@ -11,25 +11,84 @@ RUN apt-get update && \
curl \
gnupg \
apt-transport-https \
wget \
build-essential \
libncursesw5-dev \
libssl-dev \
libsqlite3-dev \
tk-dev \
libgdbm-dev \
libc6-dev \
libbz2-dev \
libffi-dev \
zlib1g-dev \
git \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Descargar e instalar Python 3.10
RUN wget https://www.python.org/ftp/python/3.10.16/Python-3.10.16.tgz --no-check-certificate && \
tar xzf Python-3.10.16.tgz && \
cd Python-3.10.16 && \
./configure --enable-optimizations && \
make altinstall && \
ln -s /usr/local/bin/python3.10 /usr/bin/python && \
cd .. && \
rm -rf Python-3.10.16*
# Verificar la instalación de Python y pip
RUN python --version && pip3.10 --version
# Descargar e instalar code-server de manera explícita
RUN curl -fsSL https://code-server.dev/install.sh | sh && \
if [ ! -f /usr/bin/code-server ]; then ln -s $(which code-server) /usr/bin/code-server; fi && \
which code-server && \
code-server --version
# Descargar e instalar code-server
RUN curl -sSL https://code-server.dev/install.sh | sh || echo "Error al instalar code-server" && \
which code-server || echo "code-server no encontrado" && \
code-server --version || echo "Error al obtener la versión de code-server"
# Instalar Node.js 22
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs && \
node -v && npm -v
# Habilitar el uso de corepack
RUN corepack enable
# Definir el directorio de trabajo
WORKDIR /app/frontend
# Copiar archivos desde la carpeta local
COPY vite-template/ .
# Instalar dependencias para evitar `npm install` en cada arranque
RUN npm install
# Crear la estructura de carpetas y asegurar permisos
RUN mkdir -p /app/backend /app/host_transfer && \
chmod -R 777 /app/backend /app/host_transfer
# Crear la carpeta en la raíz del contenedor
RUN mkdir -p /app/share && chmod 777 /app/share
# Copiar el script de inicio
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Exponer el puerto por defecto de code-server
EXPOSE 8080
EXPOSE 8080 5173
# Definir el usuario y grupo de trabajo
USER root
# Comando para iniciar code-server como root
ENTRYPOINT ["/bin/bash", "-c", "code-server /app --bind-addr 0.0.0.0:8080 --auth none -vvv"]
# Comando para iniciar code-server y react como root
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]