Просмотр исходного кода

Quito Dockerfiles obsoletos y pongo logging de eventos a true

Celestino Rey 1 год назад
Родитель
Сommit
8079094ed3
3 измененных файлов с 1 добавлено и 107 удалено
  1. 0 69
      Dockerfile.k8s
  2. 0 37
      Dockerfile.oc
  3. 1 1
      src/gestion_reservas/settings.py

+ 0 - 69
Dockerfile.k8s

@@ -1,69 +0,0 @@
-# syntax=docker/dockerfile:1
-##################
-# BUILDER        #
-##################
-
-FROM python:3.11-slim AS builder
-
-# set work directory
-WORKDIR /app
-
-# set environment variables
-ENV PYTHONDONTWRITEBYTECODE=1
-ENV PYTHONUNBUFFERED=1
-
-# install system dependencies
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends gcc
-
-# lint
-RUN pip install --upgrade pip
-RUN pip install flake8==6.0.0
-COPY . /app/
-RUN flake8 --ignore=E501,F401,E126,E722 .
-
-COPY ./src/requirements.txt .
-
-
-RUN pip wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.txt
-
-##################
-# FINAL          #
-##################
-
-FROM python:3.11-slim
-
-# create the appropriate directories
-ENV APP_HOME=/app
-RUN mkdir -p $APP_HOME
-
-WORKDIR $APP_HOME
-
-# install system dependencies
-RUN apt-get update && apt-get install nginx netcat-openbsd curl vim jq rsync libpango-1.0-0 libpangocairo-1.0-0 libcairo2 -y
-
-COPY --from=builder /app/wheels /wheels
-COPY --from=builder /app/requirements.txt .
-
-RUN pip install --upgrade pip
-RUN pip install --no-cache /wheels/*
-
-# copia fichero de configuración de nginx
-
-COPY ./nginx/nginx.conf /etc/nginx/
-
-# enlace los logs de nginx a stdout
-RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
-
-# copy entrypoint.sh
-COPY ./entrypoint.sh .
-
-# copy project
-COPY . $APP_HOME
-
-# change to the app user
-
-WORKDIR $APP_HOME/src
-
-# run entrypoint.sh
-ENTRYPOINT ["/app/entrypoint.sh"]

+ 0 - 37
Dockerfile.oc

@@ -1,37 +0,0 @@
-FROM python:3.11-slim
-
-# install system dependencies
-RUN apt-get update && apt-get install nginx netcat-openbsd curl vim jq rsync libpango-1.0-0 libpangocairo-1.0-0 libcairo2 -y
-
-# copy our nginx configuration to overwrite nginx defaults
-RUN rm /etc/nginx/sites-enabled/default
-RUN rm /etc/nginx/sites-available/default
-COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
-
-# link nginx logs to container stdout
-RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
-
-# copy the django code
-COPY ./src ./app
-
-# change our working directory to the django projcet roo
-WORKDIR /app
-
-# create virtual env (notice the location?)
-# update pip
-# install requirements
-RUN python -m venv /opt/venv && \
-    /opt/venv/bin/python -m pip install pip --upgrade && \
-    /opt/venv/bin/python -m pip install -r requirements.txt
-
-# Añade path a .bashrc
-
-RUN echo "export PATH=/opt/venv/bin/:$PATH" >> /root/.bashrc
-
-# make our entrypoint.sh executable
-RUN chmod +x config/entrypoint.sh
-
-#EXPOSE 8080
-
-# execute our entrypoint.sh file
-CMD ["./config/entrypoint.sh"]

+ 1 - 1
src/gestion_reservas/settings.py

@@ -231,7 +231,7 @@ LOGGING = {
         'eventos': {
             'handlers': ['console', 'file'],
             'level': 'DEBUG',
-            'propagate': False,
+            'propagate': True,
         },
         'gestion_reservas': {
             'handlers': ['console', 'file'],