diff --git a/Dockerfile.copia b/Dockerfile.copia deleted file mode 100644 index 33a6376..0000000 --- a/Dockerfile.copia +++ /dev/null @@ -1,40 +0,0 @@ -# yup, python 3.11! -FROM python:3.11-slim - -# install nginx y otras cosas -RUN apt-get update && apt-get install nginx netcat-openbsd curl vim jq rsync -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 - -RUN chgrp -R 0 ./app && chmod -R g=u ./app -RUN chgrp -R 0 /var/lib/nginx && chmod -R g=u /var/lib/nginx - -# 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"] diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index 01fa726..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -if [ "$DATABASE" = "postgres" ] -then - echo "Waiting for postgres..." - - while ! nc -z $SQL_HOST $SQL_PORT; do - sleep 0.1 - done - - echo "PostgreSQL started" -else - echo "la base de datos no es postgres: '$DATABASE'" -fi - -python manage.py collectstatic --noinput -#python manage.py flush --no-input -#python manage.py migrate - -exec "$@" diff --git a/src/config/entrypoint.sh b/src/config/entrypoint.sh index 8f3d562..9eb92c5 100644 --- a/src/config/entrypoint.sh +++ b/src/config/entrypoint.sh @@ -1,8 +1,8 @@ #!/bin/bash RUN_PORT="8000" -DATABASE=postgres -SQL_HOST=postgresql -SQL_PORT=5432 +#DATABASE=postgres +#SQL_HOST=postgresql +#SQL_PORT=5432 export PATH=/opt/venv/bin:$PATH diff --git a/src/reymota/urls.py b/src/reymota/urls.py index fc63594..3298b0e 100644 --- a/src/reymota/urls.py +++ b/src/reymota/urls.py @@ -23,7 +23,7 @@ from django.views.generic.base import TemplateView # new from . import views urlpatterns = [ - path('obreros/', admin.site.urls), + path('marcelo/', admin.site.urls), path('repostajes/', include('repostajes.urls')),