Subir archivos a "/"
This commit is contained in:
29
Dockerfile
Normal file
29
Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
# Instalar dependencias del sistema
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
postgresql-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copiar requirements
|
||||
COPY requirements.txt .
|
||||
|
||||
# Instalar dependencias de Python
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copiar el código de la aplicación
|
||||
COPY ./app /code/app
|
||||
COPY ./alembic /code/alembic
|
||||
COPY ./alembic.ini /code/alembic.ini
|
||||
COPY ./migrate.sh /code/migrate.sh
|
||||
RUN sed -i 's/\r$//' /code/migrate.sh && chmod +x /code/migrate.sh
|
||||
|
||||
|
||||
# Exponer el puerto
|
||||
EXPOSE 8009
|
||||
|
||||
# Comando para ejecutar la aplicación
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8009", "--reload"]
|
||||
Reference in New Issue
Block a user