From 6ed53abd70027a902aa5c3fcc95a7245f1ee3200 2023-02-07 14:17:52 From: Renato-TUF Date: 2023-02-07 14:17:52 Subject: [PATCH] Se cambia el modo de descarga de las piplibraries a descarga remota desde el servidor, se elimina una de las creaciones de los usuarios de postfres, ya se hizo la prueba con todos los dispositivos --- diff --git a/.env b/.env index 954bc78..74495f2 100644 --- a/.env +++ b/.env @@ -5,9 +5,9 @@ POSTGRES_PORT_5432_TCP_ADDR=radarsys-postgres # POSTGRES_PORT_5432_TCP_PORT=5400 POSTGRES_PORT_5432_TCP_PORT=5432 #POSTGRES_HOST?? DONDE IRIA -POSTGRES_USER=docker -POSTGRES_PASSWORD=docker -POSTGRES_DB=radarsys +# POSTGRES_USER=docker +# POSTGRES_PASSWORD=docker +# POSTGRES_DB=radarsys # DB_NAME=radarsys # DB_USER=docker diff --git a/.gitignore b/.gitignore index 55539af..c0aaafc 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ pipLibraries/ *.pyc .env remove_migrations.py +migrations/ diff --git a/Dockerfile b/Dockerfile index 9cdb8bc..6fa8404 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,22 +13,22 @@ ADD requirements.txt ./requirements.txt RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends \ gcc \ g++ \ - && pip install -v --timeout 120 --no-cache-dir ./Django-4.1.5-py3-none-any.whl \ - && pip install -v --timeout 120 --no-cache-dir ./django-bootstrap5-22.2.tar.gz \ - && pip install -v --timeout 120 --no-cache-dir ./psycopg2_binary-2.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ - && pip install -v --timeout 120 --no-cache-dir ./django-polymorphic-3.1.0.tar.gz \ - && pip install -v --timeout 120 --no-cache-dir ./numpy-1.24.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ - && pip install -v --timeout 120 --no-cache-dir ./bokeh-3.0.3-py3-none-any.whl\ - && pip install -v --timeout 120 --no-cache-dir ./matplotlib-3.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ - && pip install -v --timeout 120 --no-cache-dir ./scipy-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ - && pip install -v --timeout 120 --no-cache-dir ./celery-5.2.7.tar.gz \ - && pip install -v --timeout 120 --no-cache-dir ./gunicorn-20.1.0-py3-none-any.whl \ - && pip install -v --timeout 120 --no-cache-dir ./requests-2.28.2-py3-none-any.whl \ - && pip install -v --timeout 120 --no-cache-dir ./redis-4.4.2-py3-none-any.whl \ - && pip install -v --timeout 120 --no-cache-dir ./graphene_django-3.0.0-py2.py3-none-any.whl \ - && pip install -v --timeout 120 --no-cache-dir ./channels-4.0.0.tar.gz \ - && pip install -v --timeout 120 --no-cache-dir ./daphne-4.0.0.tar.gz \ -#&& pip install -v --timeout 120 -r requirements.txt --no-cache-dir \ + # && pip install -v --timeout 120 --no-cache-dir ./Django-4.1.5-py3-none-any.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./django-bootstrap5-22.2.tar.gz \ + # && pip install -v --timeout 120 --no-cache-dir ./psycopg2_binary-2.9.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./django-polymorphic-3.1.0.tar.gz \ + # && pip install -v --timeout 120 --no-cache-dir ./numpy-1.24.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./bokeh-3.0.3-py3-none-any.whl\ + # && pip install -v --timeout 120 --no-cache-dir ./matplotlib-3.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./scipy-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./celery-5.2.7.tar.gz \ + # && pip install -v --timeout 120 --no-cache-dir ./gunicorn-20.1.0-py3-none-any.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./requests-2.28.2-py3-none-any.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./redis-4.4.2-py3-none-any.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./graphene_django-3.0.0-py2.py3-none-any.whl \ + # && pip install -v --timeout 120 --no-cache-dir ./channels-4.0.0.tar.gz \ + # && pip install -v --timeout 120 --no-cache-dir ./daphne-4.0.0.tar.gz \ + && pip install -v --timeout 120 -r requirements.txt --no-cache-dir \ && apt-get purge -y --auto-remove gcc g++\ && rm -rf /var/lib/apt/lists/* diff --git a/docker-compose.yml b/docker-compose.yml index ba81fdb..b913498 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3' services: # Django app web: @@ -49,10 +49,11 @@ services: - pgdata:/var/lib/postgresql/data ports: - 5432:5432 - environment: - - POSTGRES_PASSWORD=docker - - POSTGRES_USER=docker - - POSTGRES_DB=radarsys + #TEMPORAL, NO DEBE HARDCODEARSE + # environment: + # - POSTGRES_PASSWORD=docker + # - POSTGRES_USER=docker + # - POSTGRES_DB=radarsys env_file: .env #Web Server diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 85c06d7..972807a 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -2,4 +2,5 @@ FROM postgres:14.6-alpine #FROM library/postgres RUN mkdir -p "$PGDATA" && chmod 700 "$PGDATA" -#COPY ./init.sql /docker-entrypoint-initdb.d/ \ No newline at end of file +#COPY ./init.sql /docker-entrypoint-initdb.d/ +COPY init.sql /docker-entrypoint-initdb.d/ \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 31887ca..8165e49 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,4 +11,4 @@ gunicorn==20.1.0 requests==2.28.2 redis==4.4.2 channels==4.0.0 -daphne==4.0.0 +daphne==4.0.0 \ No newline at end of file