|
|
@@ -1,25 +1,20 @@
|
|
|
# yup, python 3.11!
|
|
|
-FROM python:3.11-alpine as builder
|
|
|
+FROM python:3.11-alpine
|
|
|
|
|
|
# install nginx y otras cosas
|
|
|
RUN apk add nginx netcat-openbsd curl vim jq rsync pango pango-dev cairo postgresql-client bash glib fontconfig font-noto
|
|
|
|
|
|
-COPY ./nginx/default.conf /etc/nginx/nginx.conf
|
|
|
COPY ./src/requirements.txt requirements.txt
|
|
|
RUN pip install --user --no-cache-dir -r requirements.txt
|
|
|
|
|
|
+COPY ./nginx/default.conf /etc/nginx/http.d/nginx.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 && \
|
|
|
chgrp -R 0 /var/lib/nginx && \
|
|
|
chmod -R g=u /var/lib/nginx
|
|
|
|
|
|
-FROM python:3.11-alpine as main
|
|
|
-
|
|
|
-RUN apk add nginx netcat-openbsd curl vim jq rsync pango pango-dev cairo postgresql-client bash glib fontconfig font-noto
|
|
|
-
|
|
|
-COPY --from=builder /root/.local /root/.local
|
|
|
-
|
|
|
ENV PATH="/root/.local/bin:$PATH"
|
|
|
|
|
|
# copy the django code
|
|
|
@@ -31,17 +26,5 @@ RUN chgrp -R 0 ./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 && \
|
|
|
- #echo "export PATH=/opt/venv/bin/:$PATH" >> /root/.bashrc && \
|
|
|
- #chmod +x config/entrypoint.sh
|
|
|
-
|
|
|
-#EXPOSE 8080
|
|
|
-
|
|
|
# execute our entrypoint.sh file
|
|
|
-CMD ["/app/config/entrypoint-alpine.sh"]
|
|
|
-# CMD ["gunicorn", "misfinanzas.wsgi:application", "--bind", "0.0.0.0:8000", "--access-logfile", "-", "--error-logfile", "-", "--log-level", "info"]
|
|
|
+CMD ["/app/config/entrypoint.sh"]
|